|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
import * as React from "react" |
|
3
|
|
|
4
|
import { Button } from "@/components/button" |
|
5
|
import { TooltipProvider } from "@/components/tooltip" |
|
6
|
import { Copy } from "./copy" |
|
7
|
|
|
8
|
const meta: Meta<typeof Copy> = { |
|
9
|
title: "Components/Copy", |
|
10
|
component: Copy, |
|
11
|
parameters: { |
|
12
|
layout: "centered", |
|
13
|
}, |
|
14
|
render: (args) => <TooltipProvider><Copy {...args} /></TooltipProvider>, |
|
15
|
} |
|
16
|
|
|
17
|
export default meta |
|
18
|
|
|
19
|
type Story = StoryObj<typeof Copy> |
|
20
|
|
|
21
|
export const Default: Story = { |
|
22
|
args: { |
|
23
|
content: "Hello world", |
|
24
|
}, |
|
25
|
} |
|
26
|
|
|
27
|
export const AsChild: Story = { |
|
28
|
args: { |
|
29
|
content: "Hello world", |
|
30
|
asChild: true, |
|
31
|
children: <Button className="text-ui-fg-on-color">Copy</Button>, |
|
32
|
}, |
|
33
|
} |