Skip to content

Commit

Permalink
♻️ #15 - refactor: remove toolbar dependency in breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Feb 1, 2024
1 parent 1b16cf8 commit 02bf88f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import clsx from "clsx";
import React from "react";

import { Outline } from "../icon";
import { Toolbar, ToolbarProps } from "../toolbar";
import { A } from "../typography";
import { Li } from "../typography/li";
import { Ol } from "../typography/ol";
Expand All @@ -16,7 +15,7 @@ export type BreadcrumbItem = {
path: string;
};

export type BreadcrumbsProps = ToolbarProps & {
export type BreadcrumbsProps = {
/** The path */
pathItems: BreadcrumbItem[];

Expand All @@ -37,7 +36,7 @@ export const Breadcrumbs: React.FC<BreadcrumbsProps> = ({
...props
}) => {
return (
<Toolbar className="mykn-breadcrumbs" {...props}>
<nav className="mykn-breadcrumbs" {...props}>
<Ol className="mykn-breadcrumbs__list">
{pathItems.map((item, index) => {
const isLastItem = index === pathItems.length - 1;
Expand All @@ -64,6 +63,6 @@ export const Breadcrumbs: React.FC<BreadcrumbsProps> = ({
);
})}
</Ol>
</Toolbar>
</nav>
);
};

0 comments on commit 02bf88f

Please sign in to comment.