import type { Meta, StoryObj } from '@storybook/nextjs' import { RiAddLine, RiDeleteBinLine, RiEditLine, RiMore2Fill, RiSaveLine, RiShareLine } from '@remixicon/react' import ActionButton, { ActionButtonState } from '.' const meta = { title: 'Base/General/ActionButton', component: ActionButton, parameters: { layout: 'centered', docs: { description: { component: 'Action button component with multiple sizes and states. Commonly used for toolbar actions and inline operations.', }, }, }, tags: ['autodocs'], argTypes: { size: { control: 'select', options: ['xs', 'm', 'l', 'xl'], description: 'Button size', }, state: { control: 'select', options: [ ActionButtonState.Default, ActionButtonState.Active, ActionButtonState.Disabled, ActionButtonState.Destructive, ActionButtonState.Hover, ], description: 'Button state', }, children: { control: 'text', description: 'Button content', }, disabled: { control: 'boolean', description: 'Native disabled state', }, }, } satisfies Meta export default meta type Story = StoryObj // Default state export const Default: Story = { args: { size: 'm', children: , }, } // With text export const WithText: Story = { args: { size: 'm', children: 'Edit', }, } // Icon with text export const IconWithText: Story = { args: { size: 'm', children: ( <> Add Item ), }, } // Size variations export const ExtraSmall: Story = { args: { size: 'xs', children: , }, } export const Small: Story = { args: { size: 'xs', children: , }, } export const Medium: Story = { args: { size: 'm', children: , }, } export const Large: Story = { args: { size: 'l', children: , }, } export const ExtraLarge: Story = { args: { size: 'xl', children: , }, } // State variations export const ActiveState: Story = { args: { size: 'm', state: ActionButtonState.Active, children: , }, } export const DisabledState: Story = { args: { size: 'm', state: ActionButtonState.Disabled, children: , }, } export const DestructiveState: Story = { args: { size: 'm', state: ActionButtonState.Destructive, children: , }, } export const HoverState: Story = { args: { size: 'm', state: ActionButtonState.Hover, children: , }, } // Real-world examples export const ToolbarActions: Story = { render: () => (
), } export const InlineActions: Story = { render: () => (
Item name
), } export const SizeComparison: Story = { render: () => (
XS
S
M
L
XL
), } export const StateComparison: Story = { render: () => (
Default
Active
Hover
Disabled
Destructive
), } // Interactive playground export const Playground: Story = { args: { size: 'm', state: ActionButtonState.Default, children: , }, }