mirror of
https://github.com/hanzoai/o11y-components.git
synced 2026-10-30 14:54:15 +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.
151 lines
3.8 KiB
TypeScript
151 lines
3.8 KiB
TypeScript
import {
|
|
Breadcrumb,
|
|
BreadcrumbItem,
|
|
BreadcrumbLink,
|
|
BreadcrumbList,
|
|
BreadcrumbPage,
|
|
BreadcrumbSeparator,
|
|
} from '@signozhq/ui';
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
|
const meta: Meta<typeof BreadcrumbList> = {
|
|
title: 'Primitive Components/Breadcrumb/BreadcrumbList',
|
|
component: BreadcrumbList,
|
|
argTypes: {
|
|
id: {
|
|
control: 'text',
|
|
description: 'The id to apply to the breadcrumb list element.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
className: {
|
|
control: 'text',
|
|
description: 'Additional CSS classes to apply to the list.',
|
|
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 list.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
'aria-labelledby': {
|
|
control: 'text',
|
|
description: 'ID of element that labels this list.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
'aria-describedby': {
|
|
control: 'text',
|
|
description: 'ID of element that describes this list.',
|
|
table: { category: 'Accessibility', type: { summary: 'string' } },
|
|
},
|
|
children: {
|
|
control: false,
|
|
description: 'The list content (BreadcrumbItem elements).',
|
|
table: { category: 'Content', type: { summary: 'React.ReactNode' } },
|
|
},
|
|
},
|
|
parameters: {
|
|
layout: 'padded',
|
|
backgrounds: { default: 'dark' },
|
|
},
|
|
tags: ['autodocs'],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof BreadcrumbList>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
testId: 'breadcrumb-list',
|
|
},
|
|
render: (args) => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList {...args}>
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Home</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Products</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Current Page</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|
|
|
|
export const WithCustomClassName: Story = {
|
|
args: {
|
|
className: 'demo-gap',
|
|
},
|
|
render: (args) => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList {...args}>
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Home</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Current</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|
|
|
|
export const TwoItems: Story = {
|
|
render: () => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Home</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Settings</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|
|
|
|
export const ManyItems: Story = {
|
|
render: () => (
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Level 1</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Level 2</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Level 3</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbLink href="#">Level 4</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Level 5</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
),
|
|
};
|