Skip to content

Commit

Permalink
docs: access to all product icons for breadcrumb (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliepina authored Sep 26, 2023
1 parent 7302761 commit 7e49682
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/breadcrumb/stories/Breadcrumb.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,25 @@ import { action } from "@storybook/addon-actions";
import { ProductIcons } from "../../icons/dist/product-icons-enum";
import { BreadcrumbProps } from "../components/Breadcrumb";

// Filter out "Inverse" product icons for this story
const filteredProductIcons = Object.keys(ProductIcons)
.filter(key => !key.includes("Inverse"))
.reduce((obj, key) => {
obj[key] = ProductIcons[key];
return obj;
}, {});

export default {
title: "Navigation/Breadcrumb",
component: BreadcrumbItem,
subcomponents: { Breadcrumb },
argTypes: {
icon: {
options: [ProductIcons.Gear, ProductIcons.Cluster, ProductIcons.Users],
type: "select"
options: Object.keys(filteredProductIcons),
mapping: filteredProductIcons
}
}
};
} as Meta;

const Template: StoryFn<BreadcrumbProps> = args => (
<Breadcrumb>
Expand Down

0 comments on commit 7e49682

Please sign in to comment.