Skip to content

API Reference / @gtkx/storybook / index / action

Function: action() ​

action(name): ActionCallback

Defined in: packages/storybook/src/actions.ts:66

Creates a named action for a story's callback arguments. The explorer records bounded argument summaries; calls outside its action scope have no effect.

Parameters ​

name ​

string

Nonempty label displayed in the Actions panel.

Returns ​

ActionCallback

A callback to supply in story args.

Throws ​

If the name is empty or contains only whitespace.