@storybook/addon-actions

  • Version 7.6.17
  • Published
  • 364 kB
  • 6 dependencies
  • MIT license

Install

npm i @storybook/addon-actions
yarn add @storybook/addon-actions
pnpm add @storybook/addon-actions

Overview

Get UI feedback when an action is performed on an interactive element

Index

Variables

variable actions

const actions: ActionsFunction;

    variable ADDON_ID

    const ADDON_ID: string;

      variable CLEAR_ID

      const CLEAR_ID: string;

        variable config

        const config: ActionOptions;

          variable CYCLIC_KEY

          const CYCLIC_KEY: string;

            variable EVENT_ID

            const EVENT_ID: string;

              variable PANEL_ID

              const PANEL_ID: string;

                variable PARAM_KEY

                const PARAM_KEY: string;

                  Functions

                  function action

                  action: (name: string, options?: ActionOptions) => HandlerFunction;

                    function configureActions

                    configureActions: (options?: ActionOptions) => void;

                      Interfaces

                      interface ActionDisplay

                      interface ActionDisplay {}

                        property count

                        count: number;

                          property data

                          data: {
                          name: string;
                          args: any[];
                          };

                            property id

                            id: string;

                              property options

                              options: ActionOptions;

                                interface ActionsFunction

                                interface ActionsFunction {}

                                  call signature

                                  <T extends string>(
                                  handlerMap: Record<T, string>,
                                  options?: ActionOptions
                                  ): ActionsMap<T>;

                                    call signature

                                    <T extends string>(...handlers: T[]): ActionsMap<T>;

                                      call signature

                                      <T extends string>(
                                      handler1: T,
                                      handler2: T,
                                      handler3: T,
                                      handler4: T,
                                      handler5: T,
                                      handler6: T,
                                      handler7: T,
                                      handler8: T,
                                      handler9: T,
                                      options?: ActionOptions
                                      ): ActionsMap<T>;

                                        call signature

                                        <T extends string>(
                                        handler1: T,
                                        handler2: T,
                                        handler3: T,
                                        handler4: T,
                                        handler5: T,
                                        handler6: T,
                                        handler7: T,
                                        handler8: T,
                                        handler9: T,
                                        handler10: T,
                                        options?: ActionOptions
                                        ): ActionsMap<T>;

                                          call signature

                                          <T extends string>(handler1: T, options?: ActionOptions): ActionsMap<T>;

                                            call signature

                                            <T extends string>(
                                            handler1: T,
                                            handler2: T,
                                            options?: ActionOptions
                                            ): ActionsMap<T>;

                                              call signature

                                              <T extends string>(
                                              handler1: T,
                                              handler2: T,
                                              handler3: T,
                                              options?: ActionOptions
                                              ): ActionsMap<T>;

                                                call signature

                                                <T extends string>(
                                                handler1: T,
                                                handler2: T,
                                                handler3: T,
                                                handler4: T,
                                                options?: ActionOptions
                                                ): ActionsMap<T>;

                                                  call signature

                                                  <T extends string>(
                                                  handler1: T,
                                                  handler2: T,
                                                  handler3: T,
                                                  handler4: T,
                                                  handler5: T,
                                                  options?: ActionOptions
                                                  ): ActionsMap<T>;

                                                    call signature

                                                    <T extends string>(
                                                    handler1: T,
                                                    handler2: T,
                                                    handler3: T,
                                                    handler4: T,
                                                    handler5: T,
                                                    handler6: T,
                                                    options?: ActionOptions
                                                    ): ActionsMap<T>;

                                                      call signature

                                                      <T extends string>(
                                                      handler1: T,
                                                      handler2: T,
                                                      handler3: T,
                                                      handler4: T,
                                                      handler5: T,
                                                      handler6: T,
                                                      handler7: T,
                                                      options?: ActionOptions
                                                      ): ActionsMap<T>;

                                                        call signature

                                                        <T extends string>(
                                                        handler1: T,
                                                        handler2: T,
                                                        handler3: T,
                                                        handler4: T,
                                                        handler5: T,
                                                        handler6: T,
                                                        handler7: T,
                                                        handler8: T,
                                                        options?: ActionOptions
                                                        ): ActionsMap<T>;

                                                          Type Aliases

                                                          type ActionOptions

                                                          type ActionOptions = Partial<Options> & Partial<Options$1>;

                                                            type ActionsMap

                                                            type ActionsMap<T extends string = string> = Record<T, HandlerFunction>;

                                                              type DecoratorFunction

                                                              type DecoratorFunction = (args: any[]) => any[];

                                                                type HandlerFunction

                                                                type HandlerFunction = (...args: any[]) => void;

                                                                  Package Files (1)

                                                                  Dependencies (6)

                                                                  Dev Dependencies (11)

                                                                  Peer Dependencies (0)

                                                                  No peer dependencies.

                                                                  Badge

                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/addon-actions.

                                                                  • Markdown
                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/addon-actions)
                                                                  • HTML
                                                                    <a href="https://www.jsdocs.io/package/@storybook/addon-actions"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>