|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
import * as React from "react" |
|
3
|
|
|
4
|
import { CurrencyInput } from "./currency-input" |
|
5
|
|
|
6
|
const meta: Meta<typeof CurrencyInput> = { |
|
7
|
title: "Components/CurrencyInput", |
|
8
|
component: CurrencyInput, |
|
9
|
parameters: { |
|
10
|
layout: "centered", |
|
11
|
}, |
|
12
|
} |
|
13
|
|
|
14
|
export default meta |
|
15
|
|
|
16
|
type Story = StoryObj<typeof CurrencyInput> |
|
17
|
|
|
18
|
export const Default: Story = { |
|
19
|
args: { |
|
20
|
symbol: "$", |
|
21
|
code: "usd", |
|
22
|
}, |
|
23
|
} |
|
24
|
|
|
25
|
export const InGrid: Story = { |
|
26
|
render: (args) => { |
|
27
|
return ( |
|
28
|
<div className="grid w-full grid-cols-3"> |
|
29
|
<CurrencyInput {...args} /> |
|
30
|
<CurrencyInput {...args} /> |
|
31
|
<CurrencyInput {...args} /> |
|
32
|
</div> |
|
33
|
) |
|
34
|
}, |
|
35
|
args: { |
|
36
|
symbol: "$", |
|
37
|
code: "usd", |
|
38
|
}, |
|
39
|
} |