8000 feat: add support for icons and warning variant in Badge component by jaaydenh · Pull Request #17350 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: add support for icons and warning variant in Badge component #17350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add stories
  • Loading branch information
jaaydenh committed Apr 10, 2025
commit 2e26fc27df4d75e894ef588e7b91210a6816054a
23 changes: 23 additions & 0 deletions site/src/components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Settings, TriangleAlert } from "lucide-react";
import { Badge } from "./Badge";

const meta: Meta<typeof Badge> = {
Expand All @@ -13,3 +14,25 @@ export default meta;
type Story = StoryObj<typeof Badge>;

export const Default: Story = {};

export const Warning: Story = {
args: {
variant: "warning",
},
};

export const SmallWithIcon: Story = {
args: {
variant: "default",
size: "sm",
children: <>{<Settings />} Preset</>,
},
};

export const MediumWithIcon: Story = {
args: {
variant: "warning",
size: "md",
children: <>{<TriangleAlert />} Immutable</>,
},
};
Loading
0