You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
805 B
46 lines
805 B
import { ComponentMeta } from '@storybook/react';
|
|
import { Tabs } from '@tih/ui';
|
|
import React, { useState } from 'react';
|
|
|
|
export default {
|
|
title: 'Tabs',
|
|
component: Tabs,
|
|
argTypes: {
|
|
label: {
|
|
control: 'text',
|
|
},
|
|
},
|
|
} as ComponentMeta<typeof Tabs>;
|
|
|
|
export function Basic({
|
|
label,
|
|
}: Pick<React.ComponentProps<typeof Tabs>, 'label'>) {
|
|
const [value, setValue] = useState('apple');
|
|
|
|
return (
|
|
<Tabs
|
|
label={label}
|
|
onChange={setValue}
|
|
tabs={[
|
|
{
|
|
label: 'Apple',
|
|
value: 'apple',
|
|
},
|
|
{
|
|
label: 'Banana',
|
|
value: 'banana',
|
|
},
|
|
{
|
|
label: 'Orange',
|
|
value: 'orange',
|
|
},
|
|
]}
|
|
value={value}
|
|
/>
|
|
);
|
|
}
|
|
|
|
Basic.args = {
|
|
label: 'Fruits Navigation',
|
|
};
|