import { Text } from "../../text"; import { Link } from "../../link"; import { Tabs } from "../index"; import { InputDeviceProvider } from "../../../utils/hooks/use-input-device"; import type { StoryObj, Meta } from "@storybook/react"; const defaultTabProps: React.ComponentProps = { defaultTab: "items", ariaLabel: "browse tabs", tabs: [ { index: "items", tabName: "Items", count: 500, content: This is the items tab, }, { index: "collections", tabName: "Collections", content: This is the Collections tab, }, { index: "projects", tabName: "Projects", content: This is the Projects tab, }, { index: "users", tabName: "Users", content: This is the Users tab, }, ], }; const meta: Meta = { component: Tabs, title: "Tabs", decorators: [ (Story) => { return ( ); }, ], args: defaultTabProps, argTypes: { ariaLabel: { description: "aria label is applied on the `StyledList`", }, defaultTab: { description: "The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs.", table: {}, }, tabs: { description: "the tabs to render.", }, asChild: { description: "Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.", }, listProps: { description: "Injected directly into to the __StyledList__ and is defined [here](https://www.radix-ui.com/docs/components/tabs#list)", table: { category: "Anatomy Props", type: { summary: "React.ComponentProps" }, }, }, triggerProps: { description: "Injected directly into to the __StyledTrigger__ and is defined [here](https://www.radix-ui.com/docs/components/tabs#trigger)", table: { category: "Anatomy Props", type: { summary: "React.ComponentProps" }, }, }, contentProps: { description: "Injected directly into to the __StyledContent__ and is defined [here](https://www.radix-ui.com/docs/components/tabs#content)", table: { category: "Anatomy Props", type: { summary: "React.ComponentProps" }, }, }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { render: (args) => { return ; }, }; export const LinkTabs: Story = { render: (args) => { return ; }, }; LinkTabs.args = { ...defaultTabProps, tabs: [ { index: "items", tabName: Items, count: 500, content: This is the items tab, }, { index: "collections", tabName: Collections, content: This is the Collections tab, }, ], };