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
192
192
``` tsx
193
193
194
194
const 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' ,
198
198
]);
199
199
200
200
return <>
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 >
206
208
{ tabsState .map ((tab ) => (
207
- <Tab key = { tab } >{ tab } </ Tab >
209
+ <TabPanel key = { tab } >{ tab } Panel</ TabPanel >
208
210
))}
209
- </TabList >
210
- { tabsState .map ((tab ) => (
211
- <TabPanel key = { tab } >{ tab } Panel</TabPanel >
212
- ))}
213
- </Tabs >
211
+ </Tabs >
214
212
215
213
<button style = { { color: ' red' , marginTop: ' 1rem' }}
216
214
onClick$ = { () => {
@@ -276,8 +274,6 @@ const tabsClickedCountSig = useSignal(0);
276
274
277
275
return <div >
278
276
279
- { ' ' }
280
-
281
277
<h3 >Danish Composers</h3 >
282
278
<h4 >(watch the counter below)</h4 >
283
279
<Tabs
@@ -303,8 +299,6 @@ return <div>
303
299
</TabPanel >
304
300
</Tabs >
305
301
306
- { ' ' }
307
-
308
302
<p >Click count: { tabsClickedCountSig .value } </p >
309
303
310
304
</div >
You can’t perform that action at this time.
0 commit comments