mirror of
https://github.com/hanzoai/o11y-components.git
synced 2026-11-02 14:03:22 +00:00
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
135 lines
3.3 KiB
TypeScript
135 lines
3.3 KiB
TypeScript
import {
|
|
Breadcrumb,
|
|
BreadcrumbItem,
|
|
BreadcrumbLink,
|
|
BreadcrumbList,
|
|
BreadcrumbPage,
|
|
BreadcrumbSeparator,
|
|
} from '@signozhq/ui';
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
|
const meta: Meta<typeof BreadcrumbItem> = {
|
|
title: 'Primitive Components/Breadcrumb/BreadcrumbItem',
|
|
component: BreadcrumbItem,
|
|
argTypes: {
|
|
id: {
|
|
control: 'text',
|
|
description: 'The id to apply to the breadcrumb item element.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
className: {
|
|
control: 'text',
|
|
description: 'Additional CSS classes to apply to the item.',
|
|
table: { category: 'Styling', type: { summary: 'string' } },
|
|
},
|
|
testId: {
|
|
control: 'text',
|
|
description: 'Test ID for automated testing.',
|
|
table: { category: 'Testing', type: { summary: 'string' } },
|
|
},
|
|
title: {
|
|
control: 'text',
|
|
description: 'Tooltip text shown on hover.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
'aria-label': {
|
|
control: 'text',
|
|
description: 'Accessible label for the item.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
'aria-labelledby': {
|
|
control: 'text',
|
|
description: 'ID of element that labels this item.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
'aria-describedby': {
|
|
control: 'text',
|
|
description: 'ID of element that describes this item.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
children: {
|
|
control: false,
|
|
description: 'The item content (BreadcrumbLink, BreadcrumbPage, etc.).',
|
|
table: { category: 'Content', type: { summary: 'React.ReactNode' } },
|
|
},
|
|
},
|
|
parameters: {
|
|
layout: 'padded',
|
|
backgrounds: { default: 'dark' },
|
|
},
|
|
tags: ['autodocs'],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof BreadcrumbItem>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
testId: 'breadcrumb-item',
|
|
},
|
|
render: (args) => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem {...args}>
|
|
<BreadcrumbLink href="#">Home</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Current</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|
|
|
|
export const WithLink: Story = {
|
|
render: () => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Clickable Link</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Current</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|
|
|
|
export const WithPage: Story = {
|
|
render: () => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Home</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Current Page (not clickable)</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|
|
|
|
export const WithCustomClassName: Story = {
|
|
args: {
|
|
className: 'demo-strong',
|
|
},
|
|
render: (args) => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem {...args}>
|
|
<BreadcrumbLink href="#">Styled Item</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Current</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|