Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/mui/src/components/breadcrumb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({

const LinkRouter = (props: LinkProps & { to?: string }) => {
const { to, children, ...restProps } = props;

return (
<Link to={to || ""}>
<span {...restProps}>{children}</span>
<MuiLink component="span" {...restProps}>
{children}
</MuiLink>
</Link>
);
};
Expand Down Expand Up @@ -72,6 +75,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({
)}
</LinkRouter>
)}

{breadcrumbs.map(({ label, icon, href }) => {
return (
<Grid
Expand All @@ -85,6 +89,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({
}}
>
{!hideIcons && icon}

{href ? (
<LinkRouter
underline="hover"
Expand Down