diff --git a/site/src/components/Badge/Badge.stories.tsx b/site/src/components/Badge/Badge.stories.tsx index db20d721c3..1406f8bd41 100644 --- a/site/src/components/Badge/Badge.stories.tsx +++ b/site/src/components/Badge/Badge.stories.tsx @@ -1,6 +1,12 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; -import { DatabaseIcon, SettingsIcon, TriangleAlertIcon } from "lucide-react"; +import { + CheckIcon, + DatabaseIcon, + SettingsIcon, + TriangleAlertIcon, +} from "lucide-react"; import { Badges } from "#/components/Badges/Badges"; +import { Spinner } from "#/components/Spinner/Spinner"; import { Badge } from "./Badge"; const meta: Meta = { @@ -148,3 +154,22 @@ export const MediumWithIcon: Story = { ), }; + +export const StatusWithIcon: Story = { + render: () => ( + + + + Running + + + + Success + + + + Failed + + + ), +}; diff --git a/site/src/components/Badge/Badge.tsx b/site/src/components/Badge/Badge.tsx index 9cd5dec809..4b7a48120a 100644 --- a/site/src/components/Badge/Badge.tsx +++ b/site/src/components/Badge/Badge.tsx @@ -17,6 +17,8 @@ const badgeVariants = cva( variant: { default: "border-surface-secondary bg-surface-secondary text-content-secondary shadow", + outline: + "border-border bg-transparent text-content-primary shadow-none", warning: "border-highlight-orange bg-surface-orange text-highlight-orange shadow", destructive: @@ -65,7 +67,7 @@ const badgeVariants = cva( }, ); -type BadgeProps = React.ComponentPropsWithRef<"div"> & +export type BadgeProps = React.ComponentPropsWithRef<"div"> & VariantProps & { asChild?: boolean; }; diff --git a/site/src/components/Pill/Pill.stories.tsx b/site/src/components/Pill/Pill.stories.tsx deleted file mode 100644 index 9400232a05..0000000000 --- a/site/src/components/Pill/Pill.stories.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import type { Meta, StoryObj } from "@storybook/react-vite"; -import { InfoIcon } from "lucide-react"; -import { Pill, PillSpinner } from "./Pill"; - -const meta: Meta = { - title: "components/Pill", - component: Pill, - args: { - children: "Default", - }, -}; - -export default meta; -type Story = StoryObj; - -export const Default: Story = {}; - -export const Danger: Story = { - args: { - children: "Danger", - type: "danger", - }, -}; - -export const WithError: Story = { - args: { - children: "Error", - type: "error", - }, -}; - -export const Warning: Story = { - args: { - children: "Warning", - type: "warning", - }, -}; - -export const Notice: Story = { - args: { - children: "Notice", - type: "notice", - }, -}; - -export const Info: Story = { - args: { - children: "Information", - type: "info", - }, -}; - -export const Success: Story = { - args: { - children: "Success", - type: "success", - }, -}; - -export const Active: Story = { - args: { - children: "Active", - type: "active", - }, -}; - -export const Muted: Story = { - args: { - children: "Muted", - type: "muted" as const, - }, -}; - -export const WithIcon: Story = { - args: { - children: "Information", - type: "info", - icon: