diff --git a/src/components/Breadcrumbs/Breadcrumbs.stories.tsx b/src/components/Breadcrumbs/Breadcrumbs.stories.tsx new file mode 100644 index 00000000000..3d7e3eff0ea --- /dev/null +++ b/src/components/Breadcrumbs/Breadcrumbs.stories.tsx @@ -0,0 +1,24 @@ +import * as React from "react" +import { Meta, StoryObj } from "@storybook/react" +import BreadcrumbsComponent from "." + +type BreadcumbsType = typeof BreadcrumbsComponent + +const meta: Meta = { + title: "Molecules / Navigation / Breadcrumbs", + component: BreadcrumbsComponent, +} + +export default meta + +type Story = StoryObj + +export const Breadcrumbs: Story = { + render: () => ( + <> + + + + + ), +} diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs/index.tsx similarity index 86% rename from src/components/Breadcrumbs.tsx rename to src/components/Breadcrumbs/index.tsx index 76badf7f76b..70495d94252 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs/index.tsx @@ -7,7 +7,7 @@ import { BreadcrumbProps, } from "@chakra-ui/react" -import Link from "./Link" +import Link from "../Link" export interface IProps extends BreadcrumbProps { slug: string @@ -73,10 +73,10 @@ const Breadcrumbs: React.FC = ({ position="relative" zIndex="1" mb={8} + spacing="2.5" listProps={{ m: 0, - lineHeight: 1, - rowGap: 1.5, + lineHeight: 1.6, flexWrap: "wrap", }} {...restProps} @@ -87,10 +87,8 @@ const Breadcrumbs: React.FC = ({ = ({ isPartiallyActive={isCurrentPage} _hover={{ color: "primary.base", textDecor: "none" }} _active={{ color: "primary.base" }} + sx={{ + /* + * Redundancy to ensure styling on the active + * link is applied. + */ + '&[aria-current="page"]': { + color: "primary.base", + }, + }} > {crumb.text.toUpperCase()}