diff options
Diffstat (limited to 'components/Breadcrumbs')
-rw-r--r-- | components/Breadcrumbs/index.tsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/components/Breadcrumbs/index.tsx b/components/Breadcrumbs/index.tsx index c5a17b8..d773b33 100644 --- a/components/Breadcrumbs/index.tsx +++ b/components/Breadcrumbs/index.tsx @@ -6,6 +6,7 @@ import clsx from 'clsx'; export type BreadcrumbsProps = { className?: string; style?: object; + children: React.ReactNode; }; const Breadcrumbs : FC<BreadcrumbsProps> = ({children, className, ...props}) => ( @@ -25,7 +26,11 @@ const Breadcrumbs : FC<BreadcrumbsProps> = ({children, className, ...props}) => </span> ); -const Crumb : FC = ({children, ...props}) => ( +export type CrumbProps = { + children: React.ReactNode; +}; + +const Crumb : FC<CrumbProps> = ({children, ...props}) => ( <span className={styles.crumb} {...props}> {children} </span> @@ -33,12 +38,13 @@ const Crumb : FC = ({children, ...props}) => ( export type LinkCrumbProps = { href: string; + children: React.ReactNode; } const LinkCrumb : FC<LinkCrumbProps> = ({children, href, ...props}) => ( <Crumb> <Link href={href}> - <a>{children}</a> + {children} </Link> </Crumb> ); @@ -47,4 +53,4 @@ export { Crumb, Breadcrumbs, LinkCrumb -};
\ No newline at end of file +}; |