Add new story for darkmode (#317)
* Add a new story for dark mode * Reorganize storybook menu * Fix command menu margins * Fix tests
This commit is contained in:
30
front/src/__stories__/App.darkMode.stories.tsx
Normal file
30
front/src/__stories__/App.darkMode.stories.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import { Meta } from '@storybook/react';
|
||||
|
||||
import { App } from '~/App';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedUserJWT } from '~/testing/mock-data/jwt';
|
||||
|
||||
import { Story } from './App.stories';
|
||||
import { renderWithDarkMode } from './shared';
|
||||
|
||||
const meta: Meta<typeof App> = {
|
||||
title: 'App/App/DarkMode',
|
||||
component: App,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
export const DarkMode: Story = {
|
||||
render: () => renderWithDarkMode(true),
|
||||
loaders: [
|
||||
async () => ({
|
||||
accessTokenStored: window.localStorage.setItem(
|
||||
'accessToken',
|
||||
mockedUserJWT,
|
||||
),
|
||||
}),
|
||||
],
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user