Skip to content

Commit

Permalink
Improve breadcrumb component (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
nowyDEV authored Oct 6, 2023
1 parent b5da7e7 commit 9d5da4a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nordcloud/gnui",
"description": "Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products",
"version": "9.0.1",
"version": "9.1.0",
"license": "MIT",
"repository": {
"type": "git",
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 @@ -44,8 +44,8 @@ export const Default: StoryObj = {
export const CustomComponent: StoryObj = {
render: () => (
<Breadcrumbs
renderCustom={({ to }) => (
<Button as="a" linkTo={to}>
renderCustom={({ breadcrumb }) => (
<Button as="a" linkTo={breadcrumb.uri}>
test123
</Button>
)}
Expand Down
6 changes: 2 additions & 4 deletions src/components/breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ export type BreadcrumbsListProps = {
>;
renderCustom?: (
props: React.PropsWithChildren<{
to: string;
isDisabled?: boolean;
css: FlattenSimpleInterpolation;
breadcrumb: BreadcrumbsList;
}>
) => React.ReactNode;
};
Expand All @@ -33,9 +32,8 @@ export function Breadcrumbs({ list, renderCustom }: BreadcrumbsListProps) {
<li key={breadcrumb.label}>
{renderCustom ? (
renderCustom({
isDisabled: breadcrumb.isDisabled,
css: aStyles,
to: breadcrumb.uri,
breadcrumb,
})
) : (
<StyledLink
Expand Down

0 comments on commit 9d5da4a

Please sign in to comment.