Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
@@ -0,0 +1,62 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { Badge } from "~/components/ui/badge";
|
||||
|
||||
const meta: Meta<typeof Badge> = {
|
||||
title: "UI / Feedback / Badge",
|
||||
component: Badge,
|
||||
tags: ["autodocs"],
|
||||
argTypes: {
|
||||
variant: {
|
||||
control: { type: "inline-radio" },
|
||||
options: ["default", "secondary", "destructive", "outline"],
|
||||
},
|
||||
},
|
||||
args: { variant: "default", children: "New" },
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof Badge>;
|
||||
|
||||
export const Default: Story = {};
|
||||
|
||||
export const AllVariants: Story = {
|
||||
render: () => (
|
||||
<div style={{ display: "flex", gap: 8, alignItems: "center", flexWrap: "wrap" }}>
|
||||
<Badge variant="default">Default</Badge>
|
||||
<Badge variant="secondary">Secondary</Badge>
|
||||
<Badge variant="destructive">Failed</Badge>
|
||||
<Badge variant="outline">Draft</Badge>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
||||
export const SemanticColors: Story = {
|
||||
render: () => (
|
||||
<div style={{ display: "flex", gap: 8, alignItems: "center", flexWrap: "wrap" }}>
|
||||
<Badge color="green" withColorDot>
|
||||
Active
|
||||
</Badge>
|
||||
<Badge color="yellow" withColorDot>
|
||||
Pending
|
||||
</Badge>
|
||||
<Badge color="red" withColorDot>
|
||||
Failed
|
||||
</Badge>
|
||||
<Badge color="blue" withColorDot>
|
||||
Info
|
||||
</Badge>
|
||||
<Badge color="gray" withColorDot>
|
||||
Draft
|
||||
</Badge>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
||||
export const InText: Story = {
|
||||
render: () => (
|
||||
<p style={{ fontSize: 14 }}>
|
||||
Workspace status: <Badge color="green">healthy</Badge>. Latest deploy passed all gates.
|
||||
</p>
|
||||
),
|
||||
};
|
||||
Reference in new issue
Block a user