generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix missing exports, omit others as they are not needed now
Signed-off-by: Antonette Caldwell <[email protected]>
- Loading branch information
1 parent
b35d8f0
commit 65393bb
Showing
5 changed files
with
119 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |