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.
79 lines
1.8 KiB
TypeScript
79 lines
1.8 KiB
TypeScript
import { Code } from '@signozhq/icons';
|
|
import {
|
|
Button,
|
|
ButtonColor,
|
|
ButtonVariant,
|
|
Dialog,
|
|
DialogContent,
|
|
DialogDescription,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
DialogTrigger,
|
|
} from '@signozhq/ui';
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
import { titleArgTypes } from './shared/dialog-drawer-arg-types.js';
|
|
|
|
const meta: Meta<typeof DialogTitle> = {
|
|
title: 'Primitive Components/Dialog/DialogTitle',
|
|
component: DialogTitle,
|
|
argTypes: titleArgTypes,
|
|
parameters: {
|
|
layout: 'fullscreen',
|
|
},
|
|
tags: ['autodocs'],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof DialogTitle>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
children: 'Dialog title',
|
|
},
|
|
render: (args) => (
|
|
<Dialog>
|
|
<DialogTrigger asChild>
|
|
<Button variant={ButtonVariant.Solid} color={ButtonColor.Primary}>
|
|
Open dialog
|
|
</Button>
|
|
</DialogTrigger>
|
|
<DialogContent width="base">
|
|
<DialogHeader>
|
|
<DialogTitle {...args} />
|
|
</DialogHeader>
|
|
<DialogDescription>
|
|
<p style={{ fontSize: 14, lineHeight: 20, fontWeight: 400 }}>
|
|
The title labels the dialog content for assistive technologies.
|
|
</p>
|
|
</DialogDescription>
|
|
</DialogContent>
|
|
</Dialog>
|
|
),
|
|
};
|
|
|
|
export const WithIcon: Story = {
|
|
args: {
|
|
children: 'Dialog with icon',
|
|
icon: <Code size={16} />,
|
|
},
|
|
render: (args) => (
|
|
<Dialog>
|
|
<DialogTrigger asChild>
|
|
<Button variant={ButtonVariant.Solid} color={ButtonColor.Primary}>
|
|
Open dialog
|
|
</Button>
|
|
</DialogTrigger>
|
|
<DialogContent width="base">
|
|
<DialogHeader>
|
|
<DialogTitle {...args} />
|
|
</DialogHeader>
|
|
<DialogDescription>
|
|
<p style={{ fontSize: 14, lineHeight: 20, fontWeight: 400 }}>
|
|
Use the icon prop to visually differentiate dialog types.
|
|
</p>
|
|
</DialogDescription>
|
|
</DialogContent>
|
|
</Dialog>
|
|
),
|
|
};
|