Skip to content

Commit

Permalink
Merge pull request #570 from aabidsofi19/custom-modal
Browse files Browse the repository at this point in the history
fix: add theme without baseline
  • Loading branch information
aabidsofi19 authored Apr 16, 2024
2 parents d357c60 + 9eef657 commit d16b062
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/theme/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ function SistentThemeProvider({
);
}

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

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

export default SistentThemeProvider;

export { SistentThemeProvider };
5 changes: 4 additions & 1 deletion src/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export { darkModePalette, lightModePalette } from './palette';
export { typography } from './typography';

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

0 comments on commit d16b062

Please sign in to comment.