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.
80 lines
1.9 KiB
TypeScript
80 lines
1.9 KiB
TypeScript
import { Settings, User } from '@signozhq/icons';
|
|
import {
|
|
Button,
|
|
DropdownMenuItem,
|
|
DropdownMenuMultiStep,
|
|
DropdownMenuMultiStepContent,
|
|
DropdownMenuMultiStepTrigger,
|
|
DropdownMenuTrigger,
|
|
} from '@signozhq/ui';
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
|
const meta: Meta<typeof DropdownMenuMultiStep> = {
|
|
title: 'Primitive Components/DropdownMenu/DropdownMenuMultiStep',
|
|
component: DropdownMenuMultiStep,
|
|
argTypes: {
|
|
defaultOpen: {
|
|
control: 'boolean',
|
|
description: 'The open state when initially rendered.',
|
|
table: { category: 'State', type: { summary: 'boolean' } },
|
|
},
|
|
modal: {
|
|
control: 'boolean',
|
|
description:
|
|
'When true, interaction with outside elements is disabled when the menu is open.',
|
|
table: {
|
|
category: 'Behavior',
|
|
type: { summary: 'boolean' },
|
|
defaultValue: { summary: 'true' },
|
|
},
|
|
},
|
|
},
|
|
parameters: {
|
|
layout: 'fullscreen',
|
|
},
|
|
tags: ['autodocs'],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof DropdownMenuMultiStep>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
defaultOpen: false,
|
|
modal: true,
|
|
},
|
|
render: (args) => (
|
|
<div style={{ padding: 32 }}>
|
|
<DropdownMenuMultiStep {...args}>
|
|
<DropdownMenuTrigger asChild>
|
|
<Button variant="solid" color="secondary">
|
|
Options
|
|
</Button>
|
|
</DropdownMenuTrigger>
|
|
<DropdownMenuMultiStepContent
|
|
secondaryLabel="Settings"
|
|
primaryContent={
|
|
<>
|
|
<DropdownMenuItem leftIcon={<User style={{ height: 16, width: 16 }} />}>
|
|
Profile
|
|
</DropdownMenuItem>
|
|
<DropdownMenuMultiStepTrigger
|
|
leftIcon={<Settings style={{ height: 16, width: 16 }} />}
|
|
>
|
|
Settings
|
|
</DropdownMenuMultiStepTrigger>
|
|
</>
|
|
}
|
|
secondaryContent={
|
|
<>
|
|
<DropdownMenuItem>General</DropdownMenuItem>
|
|
<DropdownMenuItem>Privacy</DropdownMenuItem>
|
|
<DropdownMenuItem>Notifications</DropdownMenuItem>
|
|
</>
|
|
}
|
|
/>
|
|
</DropdownMenuMultiStep>
|
|
</div>
|
|
),
|
|
};
|