30 lines
703 B
TypeScript
30 lines
703 B
TypeScript
import type { Meta, StoryObj } from "@storybook/react";
|
|
import { Checkbox } from ".";
|
|
|
|
const meta: Meta<typeof Checkbox> = {
|
|
title: "Elements/Checkbox",
|
|
component: Checkbox,
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
component: `
|
|
- [Docs](https://ui.shadcn.com/docs/components/checkbox)
|
|
- [API Reference](https://www.radix-ui.com/primitives/docs/components/checkbox#api-reference)
|
|
`,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof Checkbox>;
|
|
|
|
export const Default: Story = {
|
|
render: () => (
|
|
<div className="flex items-center space-x-2">
|
|
<Checkbox id="terms" />
|
|
<label htmlFor="terms">Accept terms and conditions</label>
|
|
</div>
|
|
),
|
|
};
|