import { Meta, StoryObj } from "@storybook/react"; import { ButtonGroup } from "."; import { Button } from "../Button"; import { IconButton } from "../IconButton"; import { Item } from "../../Collection"; import { IconMenu } from "../../Dropdowns/IconMenu"; import { FlexArgTypes, FlexItemArgTypes, LayoutArgTypes, RenderPropsArgTypes, } from "@sb/helpers"; const meta: Meta = { title: "Buttons/ButtonGroup", component: ButtonGroup, parameters: { layout: "centered", }, argTypes: { ...RenderPropsArgTypes, ...LayoutArgTypes, ...FlexArgTypes, isDisabled: { control: "boolean", description: "Disables all of the buttons in the group. Can be overridden by the individual buttons.", }, variant: { control: "select", description: "Sets the variant for all of the buttons in the group. Can be overridden by the individual buttons.", options: [ "primary", "secondary", "error", "success", "inverted", "content", "border", "ghost", ], }, }, }; export default meta; type Story = StoryObj; export const Primary: Story = { render: (args) => ( ), args: { $gap: "5", $direction: "row", isMerged: false, isDisabled: false, }, }; export const MergedGroup: Story = { render: (args) => ( ), args: { ...Primary.args, variant: "border", isMerged: true, }, }; export const WithIconMenu: Story = { render: (args) => ( Soft Delete Hard Delete ), args: { ...Primary.args, variant: "border", isMerged: true, }, };