diff --git a/site/src/components/Breadcrumb/Breadcrumb.stories.tsx b/site/src/components/Breadcrumb/Breadcrumb.stories.tsx new file mode 100644 index 0000000000000..0b02b2ebb9939 --- /dev/null +++ b/site/src/components/Breadcrumb/Breadcrumb.stories.tsx @@ -0,0 +1,47 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import { + Breadcrumb, + BreadcrumbEllipsis, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator, +} from "components/Breadcrumb/Breadcrumb"; +import { MockOrganization } from "testHelpers/entities"; + +const meta: Meta = { + title: "components/Breadcrumb", + component: Breadcrumb, +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + children: ( + + + + Admin Settings + + + + + + + + Organizations + + + + + {MockOrganization.name} + + + + + ), + }, +}; diff --git a/site/src/components/Breadcrumb/Breadcrumb.tsx b/site/src/components/Breadcrumb/Breadcrumb.tsx new file mode 100644 index 0000000000000..cd6625a42cca3 --- /dev/null +++ b/site/src/components/Breadcrumb/Breadcrumb.tsx @@ -0,0 +1,115 @@ +/** + * Copied from shadc/ui on 12/13/2024 + * @see {@link https://ui.shadcn.com/docs/components/breadcrumb} + */ +import { Slot } from "@radix-ui/react-slot"; +import { MoreHorizontal } from "lucide-react"; +import { + type ComponentProps, + type ComponentPropsWithoutRef, + type FC, + type ReactNode, + forwardRef, +} from "react"; +import { cn } from "utils/cn"; + +export const Breadcrumb = forwardRef< + HTMLElement, + ComponentPropsWithoutRef<"nav"> & { + separator?: ReactNode; + } +>(({ ...props }, ref) =>