File tree Expand file tree Collapse file tree 1 file changed +12
-18
lines changed
apps/website/src/routes/docs/headless/(components)/tabs Expand file tree Collapse file tree 1 file changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -192,25 +192,23 @@ You can set the behavior to manual, which means that the tabs will not automatic
192192``` tsx
193193
194194const tabsState = useStore ([
195- ' Dynamic Tab 1' ,
196- ' Dynamic Tab 2' ,
197- ' Dynamic Tab 3' ,
195+ ' Dynamic Tab 1' ,
196+ ' Dynamic Tab 2' ,
197+ ' Dynamic Tab 3' ,
198198]);
199199
200200return <>
201-
202- { ' ' }
203-
204- <Tabs >
205- <TabList >
201+
202+ <Tabs >
203+ <TabList >
204+ { tabsState .map ((tab ) => (
205+ <Tab key = { tab } >{ tab } </Tab >
206+ ))}
207+ </TabList >
206208 { tabsState .map ((tab ) => (
207- <Tab key = { tab } >{ tab } </ Tab >
209+ <TabPanel key = { tab } >{ tab } Panel</ TabPanel >
208210 ))}
209- </TabList >
210- { tabsState .map ((tab ) => (
211- <TabPanel key = { tab } >{ tab } Panel</TabPanel >
212- ))}
213- </Tabs >
211+ </Tabs >
214212
215213 <button style = { { color: ' red' , marginTop: ' 1rem' }}
216214 onClick$ = { () => {
@@ -276,8 +274,6 @@ const tabsClickedCountSig = useSignal(0);
276274
277275return <div >
278276
279- { ' ' }
280-
281277<h3 >Danish Composers</h3 >
282278<h4 >(watch the counter below)</h4 >
283279<Tabs
@@ -303,8 +299,6 @@ return <div>
303299 </TabPanel >
304300</Tabs >
305301
306- { ' ' }
307-
308302<p >Click count: { tabsClickedCountSig .value } </p >
309303
310304</div >
You can’t perform that action at this time.
0 commit comments