diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs.tsx index 5460a050ca1..64bb41fc850 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs.tsx @@ -1,53 +1,11 @@ import React from "react" -import styled from "@emotion/styled" import { useTranslation } from "gatsby-plugin-react-i18next" +import { Box, UnorderedList, ListItem } from "@chakra-ui/react" import Link from "./Link" import { isLang } from "../utils/languages" import { isTranslationKey } from "../utils/translations" -const ListContainer = styled.nav` - margin-bottom: 2rem; - list-style-type: none; - /* Avoid header overlap: */ - position: relative; - z-index: 1; -` - -const List = styled.ol` - margin: 0; - list-style-type: none; - display: flex; - flex-wrap: wrap; -` - -const ListItem = styled.li` - margin: 0; - margin-right: 0.5rem; - font-size: 0.875rem; - line-height: 140%; - letter-spacing: 0.04em; -` - -const Slash = styled.span` - margin-left: 0.5rem; - color: ${(props) => props.theme.colors.textTableOfContents}; -` - -const CrumbLink = styled(Link)` - text-decoration: none; - color: ${(props) => props.theme.colors.textTableOfContents}; - - &:hover { - text-decoration: none; - color: ${(props) => props.theme.colors.primary}; - } - - &.active { - color: ${(props) => props.theme.colors.primary}; - } -` - export interface IProps { slug: string startDepth?: number @@ -91,21 +49,50 @@ const Breadcrumbs: React.FC = ({ }) return ( - - + + {crumbs.map((crumb, idx) => ( - - + {crumb.text} - - {idx < crumbs.length - 1 && /} + + {idx < crumbs.length - 1 && ( + + / + + )} ))} - - + + ) }