1+ import { ChakraProviderSetup } from "@/components/ChakraProviderSetup" ;
12import { Checkbox } from "@/components/ui/checkbox" ;
23import type { Meta , StoryObj } from "@storybook/react" ;
34import { useMutation } from "@tanstack/react-query" ;
@@ -17,6 +18,9 @@ const meta = {
1718 component : Component ,
1819 parameters : {
1920 layout : "centered" ,
21+ nextjs : {
22+ appDirectory : true ,
23+ } ,
2024 } ,
2125} satisfies Meta < typeof Component > ;
2226
@@ -70,89 +74,97 @@ function Component() {
7074 version : "1.0.0" ,
7175 } ;
7276
77+ // TODO - remove ChakraProviderSetup after converting the TransactionButton to tailwind+shadcn
78+
7379 return (
74- < ThirdwebProvider >
75- < div className = "container flex max-w-[1150px] flex-col gap-10 py-10" >
76- < div className = "flex items-center gap-5" >
77- < CheckboxWithLabel
78- value = { isOwner }
79- onChange = { setIsOwner }
80- id = "isOwner"
81- label = "Is Owner"
82- />
80+ < ChakraProviderSetup >
81+ < ThirdwebProvider >
82+ < div className = "container flex max-w-[1150px] flex-col gap-10 py-10" >
83+ < div className = "flex items-center gap-5" >
84+ < CheckboxWithLabel
85+ value = { isOwner }
86+ onChange = { setIsOwner }
87+ id = "isOwner"
88+ label = "Is Owner"
89+ />
90+ </ div >
91+
92+ < BadgeContainer label = "Empty Transfer Validator & Default Royalty Info" >
93+ < RoyaltyModuleUI
94+ contractInfo = { contractInfo }
95+ moduleAddress = "0x0000000000000000000000000000000000000000"
96+ isPending = { false }
97+ setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
98+ setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
99+ setTransferValidator = { setTransferValidatorStub }
100+ uninstallButton = { {
101+ onClick : async ( ) => removeMutation . mutateAsync ( ) ,
102+ isPending : removeMutation . isPending ,
103+ } }
104+ isOwnerAccount = { isOwner }
105+ contractChainId = { 1 }
106+ />
107+ </ BadgeContainer >
108+
109+ < BadgeContainer label = "Empty Transfer Validator & Non-Empty Default Royalty Info" >
110+ < RoyaltyModuleUI
111+ contractInfo = { contractInfo }
112+ moduleAddress = "0x0000000000000000000000000000000000000000"
113+ isPending = { false }
114+ setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
115+ setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
116+ setTransferValidator = { setTransferValidatorStub }
117+ defaultRoyaltyInfo = { [ _testAddress1 , 100 ] }
118+ uninstallButton = { {
119+ onClick : async ( ) => removeMutation . mutateAsync ( ) ,
120+ isPending : removeMutation . isPending ,
121+ } }
122+ isOwnerAccount = { isOwner }
123+ contractChainId = { 1 }
124+ />
125+ </ BadgeContainer >
126+
127+ < BadgeContainer label = "Non-Empty Transfer Validator & Empty Default Royalty Info" >
128+ < RoyaltyModuleUI
129+ contractInfo = { contractInfo }
130+ moduleAddress = "0x0000000000000000000000000000000000000000"
131+ isPending = { false }
132+ setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
133+ setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
134+ setTransferValidator = { setTransferValidatorStub }
135+ transferValidator = { "0x0000000000000000000000000000000000000000" }
136+ uninstallButton = { {
137+ onClick : async ( ) => removeMutation . mutateAsync ( ) ,
138+ isPending : removeMutation . isPending ,
139+ } }
140+ isOwnerAccount = { isOwner }
141+ contractChainId = { 1 }
142+ />
143+ </ BadgeContainer >
144+
145+ < BadgeContainer label = "Non-Empty Transfer Validator & Default Royalty Info" >
146+ < RoyaltyModuleUI
147+ contractInfo = { contractInfo }
148+ moduleAddress = "0x0000000000000000000000000000000000000000"
149+ isPending = { false }
150+ setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
151+ setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
152+ setTransferValidator = { setTransferValidatorStub }
153+ defaultRoyaltyInfo = { [ _testAddress1 , 100 ] }
154+ transferValidator = { "0x0000000000000000000000000000000000000000" }
155+ uninstallButton = { {
156+ onClick : async ( ) => removeMutation . mutateAsync ( ) ,
157+ isPending : removeMutation . isPending ,
158+ } }
159+ isOwnerAccount = { isOwner }
160+ contractChainId = { 1 }
161+ />
162+ </ BadgeContainer >
163+
164+ < Toaster richColors />
83165 </ div >
84-
85- < BadgeContainer label = "Empty Transfer Validator & Default Royalty Info" >
86- < RoyaltyModuleUI
87- contractInfo = { contractInfo }
88- moduleAddress = "0x0000000000000000000000000000000000000000"
89- isPending = { false }
90- setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
91- setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
92- setTransferValidator = { setTransferValidatorStub }
93- uninstallButton = { {
94- onClick : async ( ) => removeMutation . mutateAsync ( ) ,
95- isPending : removeMutation . isPending ,
96- } }
97- isOwnerAccount = { isOwner }
98- />
99- </ BadgeContainer >
100-
101- < BadgeContainer label = "Empty Transfer Validator & Non-Empty Default Royalty Info" >
102- < RoyaltyModuleUI
103- contractInfo = { contractInfo }
104- moduleAddress = "0x0000000000000000000000000000000000000000"
105- isPending = { false }
106- setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
107- setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
108- setTransferValidator = { setTransferValidatorStub }
109- defaultRoyaltyInfo = { [ _testAddress1 , 100 ] }
110- uninstallButton = { {
111- onClick : async ( ) => removeMutation . mutateAsync ( ) ,
112- isPending : removeMutation . isPending ,
113- } }
114- isOwnerAccount = { isOwner }
115- />
116- </ BadgeContainer >
117-
118- < BadgeContainer label = "Non-Empty Transfer Validator & Empty Default Royalty Info" >
119- < RoyaltyModuleUI
120- contractInfo = { contractInfo }
121- moduleAddress = "0x0000000000000000000000000000000000000000"
122- isPending = { false }
123- setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
124- setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
125- setTransferValidator = { setTransferValidatorStub }
126- transferValidator = { "0x0000000000000000000000000000000000000000" }
127- uninstallButton = { {
128- onClick : async ( ) => removeMutation . mutateAsync ( ) ,
129- isPending : removeMutation . isPending ,
130- } }
131- isOwnerAccount = { isOwner }
132- />
133- </ BadgeContainer >
134-
135- < BadgeContainer label = "Non-Empty Transfer Validator & Default Royalty Info" >
136- < RoyaltyModuleUI
137- contractInfo = { contractInfo }
138- moduleAddress = "0x0000000000000000000000000000000000000000"
139- isPending = { false }
140- setRoyaltyInfoForToken = { setRoyaltyInfoForToken }
141- setDefaultRoyaltyInfo = { setDefaultRoyaltyInfoStub }
142- setTransferValidator = { setTransferValidatorStub }
143- defaultRoyaltyInfo = { [ _testAddress1 , 100 ] }
144- transferValidator = { "0x0000000000000000000000000000000000000000" }
145- uninstallButton = { {
146- onClick : async ( ) => removeMutation . mutateAsync ( ) ,
147- isPending : removeMutation . isPending ,
148- } }
149- isOwnerAccount = { isOwner }
150- />
151- </ BadgeContainer >
152-
153- < Toaster richColors />
154- </ div >
155- </ ThirdwebProvider >
166+ </ ThirdwebProvider >
167+ </ ChakraProviderSetup >
156168 ) ;
157169}
158170
0 commit comments