-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
50 lines (44 loc) · 1.06 KB
/
index.stories.tsx
File metadata and controls
50 lines (44 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import * as TabsPrimitive from '@radix-ui/react-tabs';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { ComponentProps } from 'react';
import Tabs from '#ui/Common/Tabs';
type Story = StoryObj<typeof Tabs>;
type Meta = MetaObj<typeof Tabs>;
const defaultArgs: ComponentProps<typeof Tabs> = {
defaultValue: 'prebuilt',
tabs: [
{
key: 'package',
label: 'Package Manager',
},
{
key: 'prebuilt',
label: 'Prebuilt Installer',
},
{
key: 'source',
label: 'Source Code',
},
],
children: (
<>
<TabsPrimitive.Content value="package">
Package Manager
</TabsPrimitive.Content>
<TabsPrimitive.Content value="prebuilt">
Prebuilt Installer
</TabsPrimitive.Content>
<TabsPrimitive.Content value="source">Source Code</TabsPrimitive.Content>
</>
),
};
export const Default: Story = {
args: defaultArgs,
};
export const WithAddon: Story = {
args: {
...defaultArgs,
addons: 'addon',
},
};
export default { component: Tabs } as Meta;