Skip to content

Commit

Permalink
feat: storybook에 OverlayProvider 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
cruelladevil committed May 12, 2024
1 parent 0e6b601 commit e355b22
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions frontend/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { initialize, mswLoader } from 'msw-storybook-addon';
import type { Preview } from '@storybook/react';
import GlobalStyles from '../src/shared/styles/GlobalStyles';
import { ThemeProvider } from 'styled-components';
import theme from '../src/shared/styles/theme';
import { BrowserRouter } from 'react-router-dom';
import AuthProvider from '@/features/auth/components/AuthProvider';
import handlers from '@/mocks/handlers';
import { OverlayProvider } from '@/shared/hooks/useOverlay';
import GlobalStyles from '@/shared/styles/GlobalStyles';
import theme from '@/shared/styles/theme';

const customViewport = {
xxl: {
Expand Down Expand Up @@ -87,10 +88,12 @@ const preview: Preview = {
(Story) => (
<AuthProvider>
<ThemeProvider theme={theme}>
<BrowserRouter>
<GlobalStyles />
<Story />
</BrowserRouter>
<OverlayProvider>
<BrowserRouter>
<GlobalStyles />
<Story />
</BrowserRouter>
</OverlayProvider>
</ThemeProvider>
</AuthProvider>
),
Expand Down

0 comments on commit e355b22

Please sign in to comment.