forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1import type { Meta, StoryObj } from "@storybook/react";
2import { fn } from "@storybook/test";
3
4import { Button } from "./Button";
5
6// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
7const meta = {
8 title: "Example/Button",
9 component: Button,
10 parameters: {
11 // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
12 layout: "centered",
13 },
14 // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
15 tags: ["autodocs"],
16 // More on argTypes: https://storybook.js.org/docs/api/argtypes
17 argTypes: {
18 backgroundColor: { control: "color" },
19 },
20 // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
21 args: { onClick: fn() },
22} satisfies Meta<typeof Button>;
23
24export default meta;
25type Story = StoryObj<typeof meta>;
26
27// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
28export const Primary: Story = {
29 args: {
30 primary: true,
31 label: "Button",
32 },
33};
34
35export const Secondary: Story = {
36 args: {
37 label: "Button",
38 },
39};
40
41export const Large: Story = {
42 args: {
43 size: "large",
44 label: "Button",
45 },
46};
47
48export const Small: Story = {
49 args: {
50 size: "small",
51 label: "Button",
52 },
53};