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.
44 lines
752 B
44 lines
752 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 }) {
|
|
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',
|
|
};
|