/* ! * (c) Copyright 2026 Palantir Technologies Inc. All rights reserved. */ import type { Meta, StoryObj } from "@storybook/react-vite"; import { StoryLabel } from "@storybook-common"; import { Flex } from "@blueprintjs/labs"; import { Alignment, ButtonVariant, Intent, Size } from "../../common"; import { PopoverNext } from "../popover-next/popoverNext"; import { ButtonGroup } from "./buttonGroup"; import { Button } from "./buttons"; // These props are deprecated on ButtonGroup — hide them from the Storybook controls panel. const disabledArgs = ["large", "minimal", "outlined", "children", "className"] as const satisfies ReadonlyArray< keyof React.ComponentProps >; const ALIGNMENT = [Alignment.START, Alignment.CENTER, Alignment.END]; const meta: Meta = { title: "Core/Button/ButtonGroup", component: ButtonGroup, tags: ["autodocs"], args: { variant: "solid", size: "medium", fill: false, vertical: false, alignText: "center", }, argTypes: { variant: { control: "select", options: Object.values(ButtonVariant), }, size: { control: "select", options: Object.values(Size), }, alignText: { control: "select", options: Object.values(ALIGNMENT), }, fill: { control: "boolean", }, vertical: { control: "boolean", }, ...disabledArgs.reduce( (acc, argName) => { acc[argName] = { table: { disable: true, }, }; return acc; }, {} as Record<(typeof disabledArgs)[number], { table: { disable: boolean } }>, ), }, } satisfies Meta; export default meta; type Story = StoryObj; /** * A basic button group with default styling. */ export const Default: Story = { render: args => (