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.
84 lines
2.0 KiB
TypeScript
84 lines
2.0 KiB
TypeScript
import {
|
|
Button,
|
|
ButtonColor,
|
|
ButtonVariant,
|
|
Drawer,
|
|
DrawerContent,
|
|
DrawerDescription,
|
|
DrawerFooter,
|
|
DrawerHeader,
|
|
DrawerTitle,
|
|
DrawerTrigger,
|
|
} from '@signozhq/ui';
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
import { contentArgTypes } from './shared/dialog-drawer-arg-types.js';
|
|
|
|
const { position: _, ...sharedContentArgTypes } = contentArgTypes ?? {};
|
|
|
|
const meta: Meta<typeof DrawerContent> = {
|
|
title: 'Primitive Components/Drawer/DrawerContent',
|
|
component: DrawerContent,
|
|
argTypes: {
|
|
...sharedContentArgTypes,
|
|
direction: {
|
|
control: 'select',
|
|
options: ['left', 'right', 'top', 'bottom'],
|
|
description: 'The side of the viewport from which the drawer appears.',
|
|
table: {
|
|
category: 'Appearance',
|
|
type: { summary: '"left" | "right" | "top" | "bottom"' },
|
|
defaultValue: { summary: 'right' },
|
|
},
|
|
},
|
|
showOverlay: {
|
|
control: 'boolean',
|
|
description: 'Whether to render the overlay behind this content instance.',
|
|
table: {
|
|
category: 'Appearance',
|
|
type: { summary: 'boolean' },
|
|
defaultValue: { summary: 'true' },
|
|
},
|
|
},
|
|
},
|
|
parameters: {
|
|
layout: 'fullscreen',
|
|
},
|
|
tags: ['autodocs'],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof DrawerContent>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
showOverlay: true,
|
|
},
|
|
render: (args) => (
|
|
<Drawer>
|
|
<DrawerTrigger asChild>
|
|
<Button variant={ButtonVariant.Solid} color={ButtonColor.Primary}>
|
|
Open drawer
|
|
</Button>
|
|
</DrawerTrigger>
|
|
<DrawerContent {...args}>
|
|
<DrawerHeader>
|
|
<DrawerTitle>Drawer content</DrawerTitle>
|
|
</DrawerHeader>
|
|
<DrawerDescription>
|
|
<p style={{ fontSize: 14, lineHeight: 1.42857 }}>
|
|
This story focuses on the DrawerContent surface and its layout-related props.
|
|
</p>
|
|
</DrawerDescription>
|
|
<DrawerFooter>
|
|
<Button variant={ButtonVariant.Ghost} color="secondary">
|
|
Secondary action
|
|
</Button>
|
|
<Button variant={ButtonVariant.Solid} color={ButtonColor.Primary}>
|
|
Primary action
|
|
</Button>
|
|
</DrawerFooter>
|
|
</DrawerContent>
|
|
</Drawer>
|
|
),
|
|
};
|