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:
Félix Malfait
2023-06-17 14:52:49 +02:00
committed by GitHub
parent 299ca293a8
commit 5ae5f28dcb
14 changed files with 87 additions and 36 deletions

View File

@ -1,14 +1,10 @@
import { MemoryRouter } from 'react-router-dom';
import { ApolloProvider } from '@apollo/client';
import type { Meta, StoryObj } from '@storybook/react';
import { RecoilRoot } from 'recoil';
import { App } from '~/App';
import { AuthProvider } from '~/providers/AuthProvider';
import { FullHeightStorybookLayout } from '~/testing/FullHeightStorybookLayout';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { mockedUserJWT } from '~/testing/mock-data/jwt';
import { mockedClient } from '~/testing/mockedClient';
import { render } from './shared';
const meta: Meta<typeof App> = {
title: 'App/App',
@ -16,21 +12,7 @@ const meta: Meta<typeof App> = {
};
export default meta;
type Story = StoryObj<typeof App>;
const render = () => (
<RecoilRoot>
<ApolloProvider client={mockedClient}>
<MemoryRouter>
<FullHeightStorybookLayout>
<AuthProvider>
<App />
</AuthProvider>
</FullHeightStorybookLayout>
</MemoryRouter>
</ApolloProvider>
</RecoilRoot>
);
export type Story = StoryObj<typeof App>;
export const Default: Story = {
render,