import type { Meta, StoryObj } from "@storybook/nextjs-vite" import { fn } from "storybook/test" import { MaterialIcon } from "../Icons/MaterialIcon/index.tsx" import { ChipButton } from "./ChipButton.tsx" import { config as chipButtonConfig } from "./variants" const meta: Meta = { title: "Core Components/ChipButton", component: ChipButton, argTypes: { children: { table: { disable: true, }, }, variant: { control: "select", options: Object.keys(chipButtonConfig.variants.variant), table: { type: { summary: Object.keys(chipButtonConfig.variants.variant).join(" | "), }, defaultValue: { summary: chipButtonConfig.defaultVariants.variant }, }, }, size: { control: "select", options: Object.keys(chipButtonConfig.variants.size), table: { type: { summary: Object.keys(chipButtonConfig.variants.size).join(" | "), }, defaultValue: { summary: "Large" }, }, description: "Sets the size of the ChipButton component. This only affects the `FilterRounded` variant.", }, selected: { control: "boolean", table: { type: { summary: "boolean" }, defaultValue: { summary: "false" }, }, }, onPress: { table: { disable: true, }, }, }, } export default meta type Story = StoryObj export const Default: Story = { args: { onPress: fn(), children: ( <> Button Chip ), }, } export const Outlined: Story = { args: { variant: "Outlined", onPress: fn(), children: ( <> Button Chip ), }, } export const FilterRoundedLarge: Story = { args: { variant: "FilterRounded", onPress: fn(), size: "Large", children: ( <> Button Chip ), }, } export const FilterRoundedLargeSelected: Story = { args: { variant: "FilterRounded", onPress: fn(), size: "Large", selected: true, children: ( <> Button Chip ), }, } export const FilterRoundedMedium: Story = { args: { variant: "FilterRounded", onPress: fn(), size: "Medium", children: ( <> Button Chip ), }, } export const FilterRoundedMediumSelected: Story = { args: { variant: "FilterRounded", onPress: fn(), size: "Medium", selected: true, children: ( <> Button Chip ), }, }