@storybook/addon-actions

  • Version 6.2.9
  • Published
  • 97.3 kB
  • 17 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 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;

                    function decorate

                    decorate: (
                    _decorators: DecoratorFunction[]
                    ) => () => { action: () => void; actions: () => void; withActions: () => void };

                      function decorateAction

                      decorateAction: (_decorators: DecoratorFunction[]) => () => void;

                        function withActions

                        withActions: (...args: any) => any;

                          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 ActionOptions

                                    interface ActionOptions {}

                                      property allowFunction

                                      allowFunction?: boolean;

                                        property clearOnStoryChange

                                        clearOnStoryChange?: boolean;

                                          property depth

                                          depth?: number;

                                            property limit

                                            limit?: number;

                                              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 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 (13)

                                                                              Dependencies (17)

                                                                              Dev Dependencies (2)

                                                                              Peer Dependencies (2)

                                                                              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>