Skip to content

Commit

Permalink
added slot
Browse files Browse the repository at this point in the history
  • Loading branch information
coderwelsch committed Mar 12, 2024
1 parent c4020fc commit 8708122
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/components/breadcrumbs/breadcrumbs-item.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { classNames } from "../../util/class-names";
import { AsChildProps, Slot } from "../slot/slot";

type BreadcrumbItemProps = AsChildProps<React.AnchorHTMLAttributes<HTMLAnchorElement>> & {
isActive?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/components/breadcrumbs/breadcrumbs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const Base: Story = {

<Breadcrumbs.Arrow />

<Breadcrumbs.Item href="/" active>
Book
<Breadcrumbs.Item asChild isActive>
<a href="/">dsjkdskjdssdkj</a>
</Breadcrumbs.Item>
</Breadcrumbs>
</div>
Expand Down
6 changes: 1 addition & 5 deletions src/components/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ export interface BreadcrumbsProps {
}

const Breadcrumbs = ({ children }: BreadcrumbsProps) => {
return (
<nav className="flex flex-row items-center justify-center gap-1" role="navigation">
{children}
</nav>
);
return <nav className="flex flex-row items-center gap-1">{children}</nav>;
};

Breadcrumbs.Item = BreadcrumbsItem;
Expand Down

0 comments on commit 8708122

Please sign in to comment.