1
1
import type { Meta } from '@storybook/react'
2
+ import { Stack } from 'styled-system/jsx'
2
3
import * as Tabs from '~/components/ui/tabs'
3
4
4
5
const meta : Meta = {
@@ -8,12 +9,6 @@ const meta: Meta = {
8
9
export default meta
9
10
10
11
export const Base = ( ) => {
11
- const options = [
12
- { id : 'react' , label : 'React' } ,
13
- { id : 'solid' , label : 'Solid' } ,
14
- { id : 'svelte' , label : 'Svelte' , disabled : true } ,
15
- { id : 'vue' , label : 'Vue' } ,
16
- ]
17
12
return (
18
13
< Tabs . Root defaultValue = "react" >
19
14
< Tabs . List >
@@ -31,3 +26,47 @@ export const Base = () => {
31
26
</ Tabs . Root >
32
27
)
33
28
}
29
+
30
+ export const Sizes = ( ) => {
31
+ return (
32
+ < Stack gap = "3" >
33
+ < Tabs . Root defaultValue = "react" variant = "enclosed" size = "sm" >
34
+ < Tabs . List >
35
+ { options . map ( ( option ) => (
36
+ < Tabs . Trigger key = { option . id } value = { option . id } disabled = { option . disabled } >
37
+ { option . label }
38
+ </ Tabs . Trigger >
39
+ ) ) }
40
+ < Tabs . Indicator />
41
+ </ Tabs . List >
42
+ </ Tabs . Root >
43
+ < Tabs . Root defaultValue = "react" variant = "enclosed" size = "md" >
44
+ < Tabs . List >
45
+ { options . map ( ( option ) => (
46
+ < Tabs . Trigger key = { option . id } value = { option . id } disabled = { option . disabled } >
47
+ { option . label }
48
+ </ Tabs . Trigger >
49
+ ) ) }
50
+ < Tabs . Indicator />
51
+ </ Tabs . List >
52
+ </ Tabs . Root >
53
+ < Tabs . Root defaultValue = "react" variant = "enclosed" size = "lg" >
54
+ < Tabs . List >
55
+ { options . map ( ( option ) => (
56
+ < Tabs . Trigger key = { option . id } value = { option . id } disabled = { option . disabled } >
57
+ { option . label }
58
+ </ Tabs . Trigger >
59
+ ) ) }
60
+ < Tabs . Indicator />
61
+ </ Tabs . List >
62
+ </ Tabs . Root >
63
+ </ Stack >
64
+ )
65
+ }
66
+
67
+ const options = [
68
+ { id : 'react' , label : 'React' } ,
69
+ { id : 'solid' , label : 'Solid' } ,
70
+ { id : 'svelte' , label : 'Svelte' , disabled : true } ,
71
+ { id : 'vue' , label : 'Vue' } ,
72
+ ]
0 commit comments