|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
import React from "react" |
|
3
|
import { Badge } from "../badge" |
|
4
|
import { TooltipProvider } from "../tooltip" |
|
5
|
import { Command } from "./command" |
|
6
|
|
|
7
|
const meta: Meta<typeof Command> = { |
|
8
|
title: "Components/Command", |
|
9
|
component: Command, |
|
10
|
parameters: { |
|
11
|
layout: "centered", |
|
12
|
}, |
|
13
|
} |
|
14
|
|
|
15
|
export default meta |
|
16
|
|
|
17
|
type Story = StoryObj<typeof Command> |
|
18
|
|
|
19
|
export const Default: Story = { |
|
20
|
render: () => { |
|
21
|
return ( |
|
22
|
<TooltipProvider> |
|
23
|
<div className="w-[500px]"> |
|
24
|
<Command> |
|
25
|
<Badge className="dark" size="small" color="green"> |
|
26
|
GET |
|
27
|
</Badge> |
|
28
|
<code>localhost:9000/store/products</code> |
|
29
|
<Command.Copy content="localhost:9000/store/products" /> |
|
30
|
</Command> |
|
31
|
</div> |
|
32
|
</TooltipProvider> |
|
33
|
) |
|
34
|
}, |
|
35
|
} |