u
This commit is contained in:
@@ -8,18 +8,18 @@ class CategoryBreadcrumbs extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { crumbs } = this.props;
|
||||
const { crumbs, sx, variant = 'body2' } = this.props;
|
||||
const visible = (crumbs ?? []).filter((crumb) => crumb.name);
|
||||
if (visible.length === 0) return null;
|
||||
|
||||
return (
|
||||
<Breadcrumbs sx={{ mb: 2 }} aria-label="Kategoriepfad">
|
||||
<Breadcrumbs sx={sx ?? { mb: 2 }} aria-label="Kategoriepfad">
|
||||
{visible.map((crumb, index) => (
|
||||
<Link
|
||||
key={crumb.id}
|
||||
component="button"
|
||||
type="button"
|
||||
variant="body2"
|
||||
variant={variant}
|
||||
underline="always"
|
||||
color="inherit"
|
||||
aria-current={index === visible.length - 1 ? 'page' : undefined}
|
||||
|
||||
Reference in New Issue
Block a user