mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-15 17:56:21 +01:00
22 lines
767 B
TypeScript
22 lines
767 B
TypeScript
|
|
import { useDarkMode } from 'storybook-dark-mode';
|
||
|
|
import { MantineProvider, ColorSchemeProvider } from '@mantine/core';
|
||
|
|
import { NotificationsProvider } from '@mantine/notifications';
|
||
|
|
|
||
|
|
export const parameters = { layout: 'fullscreen' };
|
||
|
|
|
||
|
|
function ThemeWrapper(props: { children: React.ReactNode }) {
|
||
|
|
return (
|
||
|
|
<ColorSchemeProvider colorScheme="light" toggleColorScheme={() => {}}>
|
||
|
|
<MantineProvider
|
||
|
|
theme={{ colorScheme: useDarkMode() ? 'dark' : 'light' }}
|
||
|
|
withGlobalStyles
|
||
|
|
withNormalizeCSS
|
||
|
|
>
|
||
|
|
<NotificationsProvider>{props.children}</NotificationsProvider>
|
||
|
|
</MantineProvider>
|
||
|
|
</ColorSchemeProvider>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export const decorators = [(renderStory: Function) => <ThemeWrapper>{renderStory()}</ThemeWrapper>];
|