File tree Expand file tree Collapse file tree 3 files changed +29
-25
lines changed
src/app/stories/design-system/components/modal Expand file tree Collapse file tree 3 files changed +29
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import type { Preview } from "@storybook/react" ;
2+ import "../src/app/globals.css" ;
3+ import { QueryClient , QueryClientProvider } from "@tanstack/react-query" ;
4+ import React from "react" ;
5+ import { Decorator } from "@storybook/react" ;
6+
7+ const queryClient = new QueryClient ( ) ;
8+
9+ const withQueryClient : Decorator = ( Story ) => {
10+ return (
11+ < QueryClientProvider client = { queryClient } >
12+ < Story />
13+ </ QueryClientProvider >
14+ ) ;
15+ } ;
16+
17+ const preview : Preview = {
18+ parameters : {
19+ controls : {
20+ matchers : {
21+ color : / ( b a c k g r o u n d | c o l o r ) $ / i,
22+ date : / D a t e $ / i,
23+ } ,
24+ } ,
25+ } ,
26+ decorators : [ withQueryClient ] ,
27+ } ;
28+
29+ export default preview ;
Original file line number Diff line number Diff line change 11import ModalLayout from "@/app/components/modal/ModalLayout" ;
22import useModalStore from "@/store/modalStore" ;
33import type { Meta , StoryObj } from "@storybook/react" ;
4- import { QueryClient , QueryClientProvider } from "@tanstack/react-query" ;
5-
6- const queryClient = new QueryClient ( ) ;
74
85const meta : Meta < typeof ModalLayout > = {
96 title : "Design System/Components/Modal/ModalLayout" ,
107 component : ModalLayout ,
118 parameters : {
129 layout : "centered" ,
1310 } ,
14- decorators : [
15- ( Story ) => (
16- < QueryClientProvider client = { queryClient } >
17- < Story />
18- </ QueryClientProvider >
19- ) ,
20- ] ,
2111} ;
2212
2313export default meta ;
You can’t perform that action at this time.
0 commit comments