Skip to content

Commit 3dc973c

Browse files
committedMar 17, 2025·
added badge story
1 parent d820359 commit 3dc973c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
 

‎src/stories/Badge.stories.tsx

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import type { Meta, StoryObj } from "@storybook/react"
2+
import { Badge } from "../ui/Badge" // Adjust the path to your Badge component
3+
import { css } from "@emotion/react"
4+
5+
const meta: Meta<typeof Badge> = {
6+
title: "Components/Badge",
7+
component: Badge,
8+
parameters: {
9+
layout: "centered",
10+
},
11+
tags: ["autodocs"],
12+
argTypes: {
13+
children: { control: "text" },
14+
},
15+
}
16+
17+
export default meta
18+
19+
export const Default: StoryObj<typeof Badge> = {
20+
args: {
21+
children: "Model",
22+
},
23+
}
24+
25+
export const YellowBadge: StoryObj<typeof Badge> = {
26+
args: {
27+
children: "Plan",
28+
cssStyle: css`
29+
background-color: #ffdd67;
30+
color: black;
31+
`,
32+
},
33+
}
34+
35+
export const BlueBadge: StoryObj<typeof Badge> = {
36+
args: {
37+
children: "Dataset",
38+
cssStyle: css`
39+
background-color: #6e8dde;
40+
color: white;
41+
`,
42+
},
43+
}

0 commit comments

Comments
 (0)
Please sign in to comment.