chore: catch up Storybook preview, coverage, and story hygiene
Stories were throwing without AuthModal/CreateFlow providers, autodocs was a no-op, and several DS/create-flow screens had no stories.
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
import ListItem from "../../app/components/layout/ListItem";
|
||||
import { ICON_NAME_OPTIONS } from "../../app/components/asset/icon";
|
||||
|
||||
export default {
|
||||
title: "Components/Layout/ListItem",
|
||||
component: ListItem,
|
||||
parameters: {
|
||||
layout: "centered",
|
||||
docs: {
|
||||
description: {
|
||||
component:
|
||||
"Icon + label menuitem row used in Popover export menus and CreateFlowTopNav action menus. Distinct from List / ListEntry data rows.",
|
||||
},
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
label: { control: { type: "text" } },
|
||||
leadingIcon: {
|
||||
control: { type: "select" },
|
||||
options: [...ICON_NAME_OPTIONS],
|
||||
},
|
||||
showDivider: { control: { type: "boolean" } },
|
||||
variant: {
|
||||
control: { type: "select" },
|
||||
options: ["default", "destructive"],
|
||||
},
|
||||
onClick: { action: "clicked" },
|
||||
},
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<div className="w-[240px] bg-[var(--color-surface-default-primary)]">
|
||||
<Story />
|
||||
</div>
|
||||
),
|
||||
],
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
label: "PDF",
|
||||
leadingIcon: "picture_as_pdf",
|
||||
showDivider: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const ExportMenu = {
|
||||
render: (args) => (
|
||||
<div>
|
||||
<ListItem
|
||||
{...args}
|
||||
label="PDF"
|
||||
leadingIcon="picture_as_pdf"
|
||||
showDivider
|
||||
/>
|
||||
<ListItem {...args} label="CSV" leadingIcon="csv" showDivider />
|
||||
<ListItem
|
||||
{...args}
|
||||
label="Markdown"
|
||||
leadingIcon="markdown_copy"
|
||||
showDivider={false}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
||||
export const Destructive = {
|
||||
args: {
|
||||
label: "Log out",
|
||||
leadingIcon: "log_out",
|
||||
showDivider: false,
|
||||
variant: "destructive",
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user