import type { Meta, StoryFn } from '@storybook/react' import { createSizeDecorator } from '../../utils/decorators' import { Typography } from '../Typography' import { HeaderNavTabs } from './HeaderNavTabs' export default { title: 'Navigation/NavTabs/HeaderNavTabs', component: HeaderNavTabs, decorators: [createSizeDecorator('XS')], argTypes: { path: { description: 'Current pathname (e.g., from useRouter().asPath or useLocation().pathname)', control: 'text', table: { type: { summary: 'string' }, defaultValue: { summary: '"/"' }, }, }, links: { description: 'Array of navigation links with href and name properties', control: 'object', table: { type: { summary: 'NavigationLink[]' }, }, }, renderLink: { description: 'Custom link component renderer. Defaults to a regular anchor tag.', control: false, table: { type: { summary: '(props: { href: string; children: React.ReactNode }) => React.ReactNode', }, }, }, className: { description: 'Additional className for the NavTabs root', control: 'text', table: { type: { summary: 'string' }, }, }, }, args: { path: '/feeds', links: [ { href: '/', name: 'Home' }, { href: '/feeds', name: 'Feeds' }, { href: '/streams', name: 'Streams' }, ], indicatorOffset: undefined, className: '', }, } satisfies Meta export const Default: StoryFn = (args) => (
) export const WithCustomLinks: StoryFn = (args) => (
) export const WithTypographyRenderLink: StoryFn = (args) => (
( {children} )} />
) export const DifferentPaths: StoryFn = (args) => (
Path: /
Path: /feeds
Path: /feeds/ethereum
Path: /streams
Path: /streams/bitcoin
)