Skip to content

Commit

Permalink
fix: fix missing exports, omit others as they are not needed now
Browse files Browse the repository at this point in the history
Signed-off-by: Antonette Caldwell <[email protected]>
  • Loading branch information
nebula-aac committed Feb 9, 2024
1 parent b35d8f0 commit 65393bb
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 39 deletions.
16 changes: 15 additions & 1 deletion src/custom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { ErrorBoundary, WithErrorBoundary, withSuppressedErrorBoundary } from '.
import { FlipCard } from './FlipCard';
import { useWindowDimensions } from './Helpers/Dimension';
import { useNotificationHandler } from './Helpers/Notification';
import PopperListener, { IPopperListener } from './PopperListener';
import ResponsiveDataTable from './ResponsiveDataTable';
import SearchBar, { SearchBarProps } from './SearchBar';
import { StyledTooltip } from './Tooltip';
import UniversalFilter, { UniversalFilterProps } from './UniversalFilter';

export { StyledChartDialog } from './ChartDialog';
export { StyledSearchBar } from './StyledSearchBar';
Expand All @@ -19,10 +23,20 @@ export {
EmptyState,
ErrorBoundary,
FlipCard,
PopperListener,
ResponsiveDataTable,
SearchBar,
StyledTooltip,
UniversalFilter,
WithErrorBoundary,
useNotificationHandler,
useWindowDimensions,
withSuppressedErrorBoundary
};
export type { CustomColumn, CustomColumnVisibilityControlProps };
export type {
CustomColumn,
CustomColumnVisibilityControlProps,
IPopperListener,
SearchBarProps,
UniversalFilterProps
};
37 changes: 37 additions & 0 deletions src/theme/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { EmotionCache } from '@emotion/react';
import { CssBaseline, PaletteMode, Theme, ThemeProvider } from '@mui/material';
import React from 'react';
import { createCustomTheme } from './theme';

interface SistentProviderContextType {
emotionCache?: EmotionCache;
}

export const SistentThemeProviderContext = React.createContext<SistentProviderContextType>({});

export interface SistentThemeProviderProps {
children: React.ReactNode;
emotionCache?: EmotionCache;
initialMode?: PaletteMode;
}

function SistentThemeProvider({
children,
emotionCache,
initialMode = 'light'
}: SistentThemeProviderProps): JSX.Element {
const theme = React.useMemo<Theme>(() => createCustomTheme(initialMode), [initialMode]);

return (
<SistentThemeProviderContext.Provider value={{ emotionCache }}>
<ThemeProvider theme={theme}>
<CssBaseline />
{children}
</ThemeProvider>
</SistentThemeProviderContext.Provider>
);
}

export default SistentThemeProvider;

export { SistentThemeProvider };
2 changes: 1 addition & 1 deletion src/theme/colors.ts → src/theme/colors/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const actionIcon = {
hover: darkTeal.dark
};

export const tabeMenu = {
export const tabMenu = {
main: darkTeal.main,
hover: darkTeal.dark
};
Expand Down
64 changes: 64 additions & 0 deletions src/theme/colors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
export {
ALICE_BLUE,
ANAKIWA,
BLACK,
CARIBBEAN_GREEN,
CASPER,
CHARCOAL,
CHINESE_SILVER,
CONNECTED,
CULTURED,
DARK_BLUE_GRAY,
DARK_PRIMARY_COLOR,
DARK_SHADE_GRAY,
DARK_SLATE_GRAY,
DARK_TEAL,
DELETED,
DISCONNECTED,
DISCOVERED,
EERIE_BLACK,
GRAY,
GRAY97,
GREEN,
IGNORED,
KEPPEL,
LIGHT_GRAY,
LIGHT_TEAL,
LIMED_SPRUCE,
MAINTAINENCE,
NOT_FOUND,
PATTERNS_BLUE,
PRIMARY_COLOR,
REGISTERED,
SAFFRON,
TEAL_BLUE,
WHITE,
WHITESMOKE,
YELLOW_SEA,
accentGrey,
actionIcon,
anakiwa,
black,
blue,
buttonDelete,
buttonDisabled,
casper,
charcoal,
common,
connected,
cultured,
darkSlateGray,
darkTeal,
eerieBlack,
green,
jungleGreen,
notificationColors,
patternsBlue,
primaryColor,
red,
redDelete,
tabMenu,
tableBackgroundHover,
white,
yellow
} from './colors';
39 changes: 2 additions & 37 deletions src/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,2 @@
import { EmotionCache } from '@emotion/react';
import { CssBaseline, PaletteMode, Theme, ThemeProvider } from '@mui/material';
import React from 'react';
import { createCustomTheme } from './theme';

interface SistentProviderContextType {
emotionCache?: EmotionCache;
}

export const SistentThemeProviderContext = React.createContext<SistentProviderContextType>({});

export interface SistentThemeProviderProps {
children: React.ReactNode;
emotionCache?: EmotionCache;
initialMode?: PaletteMode;
}

function SistentThemeProvider({
children,
emotionCache,
initialMode = 'light'
}: SistentThemeProviderProps): JSX.Element {
const theme = React.useMemo<Theme>(() => createCustomTheme(initialMode), [initialMode]);

return (
<SistentThemeProviderContext.Provider value={{ emotionCache }}>
<ThemeProvider theme={theme}>
<CssBaseline />
{children}
</ThemeProvider>
</SistentThemeProviderContext.Provider>
);
}

export default SistentThemeProvider;

export { SistentThemeProvider };
export { default as SistentThemeProvider } from './ThemeProvider';
export * from './colors';

0 comments on commit 65393bb

Please sign in to comment.