You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/sidebar/SidebarItem/SidebarItem.stories.tsx

40 lines
770 B

import { Meta, Story } from '@storybook/react';
import { Clock, Icon } from 'lucide-react';
import { SidebarItem } from '.';
const meta: Meta = {
title: 'Sidebar/SidebarItem',
component: SidebarItem,
};
export default meta;
interface StoryProps {
icon?: Icon;
label: string;
}
function Template({ icon, label }: StoryProps) {
return (
<ul className="sidebar">
<SidebarItem
to="example.path"
params={{ endpointId: 1 }}
icon={icon}
label={label}
/>
</ul>
);
}
export const Primary: Story<StoryProps> = Template.bind({});
Primary.args = {
icon: Clock,
label: 'Item with icon',
};
export const WithoutIcon: Story<StoryProps> = Template.bind({});
WithoutIcon.args = {
label: 'Item without icon',
};