import React, { Children, FC } from "react"; import Link from '../Link'; import styles from './breadcrumbs.module.scss'; import clsx from 'clsx'; export type BreadCrumbsProps = { className?: string; style?: object; children: React.ReactNode; }; const BreadCrumbs : FC = ({children, className, style, ...props}) => ( {Children.map(children, (child, index) => { return ( <> { index !== 0 ? ( / ) : undefined } {child} ); })} ); export type CrumbProps = { children: React.ReactNode; }; const Crumb : FC = ({children, ...props}) => ( {children} ); export type LinkCrumbProps = { href: string; children: React.ReactNode; } const LinkCrumb : FC = ({children, href, ...props}) => ( {children} ); export { Crumb, BreadCrumbs, LinkCrumb };