@storybook/angular

  • Version 7.0.18
  • Published
  • 378 kB
  • 28 dependencies
  • MIT license

Install

npm i @storybook/angular
yarn add @storybook/angular
pnpm add @storybook/angular

Overview

Storybook for Angular: Develop Angular components in isolation with hot reloading.

Index

Variables

variable configure

const configure: (loader: Addon_Loadable, module: NodeModule) => void;

    variable forceReRender

    const forceReRender: () => void;

      variable raw

      const raw: () => any;

        variable storiesOf

        const storiesOf: any;

          Functions

          function applicationConfig

          applicationConfig: <TArgs = any>(
          config: ApplicationConfig
          ) => DecoratorFunction<AngularRenderer, TArgs>;
          • Decorator to set the config options which are available during the application bootstrap operation

          function componentWrapperDecorator

          componentWrapperDecorator: <TArgs = any>(
          element: any,
          props?:
          | ICollection
          | ((storyContext: StoryContext<AngularRenderer, TArgs>) => ICollection)
          ) => DecoratorFunction<AngularRenderer, TArgs>;

            function moduleMetadata

            moduleMetadata: <TArgs = any>(
            metadata: Partial<NgModuleMetadata>
            ) => DecoratorFunction<AngularRenderer, TArgs>;

              Interfaces

              interface AngularOptions

              interface AngularOptions {}

                property enableIvy

                enableIvy?: boolean;

                  property enableNgcc

                  enableNgcc?: boolean;

                    interface AngularRenderer

                    interface AngularRenderer extends WebRenderer {}

                      property component

                      component: any;

                        property storyResult

                        storyResult: StoryFnAngularReturnType;

                          interface IStory

                          interface StoryFnAngularReturnType {}

                            property applicationConfig

                            applicationConfig?: ApplicationConfig;

                              property moduleMetadata

                              moduleMetadata?: NgModuleMetadata;

                                property props

                                props?: ICollection;

                                  property styles

                                  styles?: string[];

                                    property template

                                    template?: string;

                                      property userDefinedTemplate

                                      userDefinedTemplate?: boolean;

                                        Type Aliases

                                        type AngularParameters

                                        type Parameters = DefaultParameters & {
                                        bootstrapModuleOptions?: unknown;
                                        };

                                          type Decorator

                                          type Decorator<TArgs = StrictArgs> = DecoratorFunction<AngularRenderer, TArgs>;

                                            type FrameworkOptions

                                            type FrameworkOptions = AngularOptions & {
                                            builder?: BuilderOptions;
                                            };

                                              type Loader

                                              type Loader<TArgs = StrictArgs> = LoaderFunction<AngularRenderer, TArgs>;

                                                type Meta

                                                type Meta<TArgs = Args> = ComponentAnnotations<AngularRenderer, TArgs>;
                                                • Metadata to configure the stories for a component.

                                                  See Also

                                                  • [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)

                                                type Preview

                                                type Preview = ProjectAnnotations<AngularRenderer>;

                                                  type Story

                                                  type Story<TArgs = Args> = StoryFn<TArgs>;
                                                  • See Also

                                                    • [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)

                                                    Deprecated

                                                    Use StoryFn instead. Use StoryObj if you want to migrate to CSF3, which uses objects instead of functions to represent stories. You can read more about the CSF3 format here: https://storybook.js.org/blog/component-story-format-3-0/

                                                    Story function that represents a CSFv2 component example.

                                                  type StorybookConfig

                                                  type StorybookConfig = Omit<
                                                  StorybookConfigBase,
                                                  keyof StorybookConfigWebpack | keyof StorybookConfigFramework
                                                  > &
                                                  StorybookConfigWebpack &
                                                  StorybookConfigFramework;
                                                  • The interface for Storybook configuration in main.ts files.

                                                  type StoryContext

                                                  type StoryContext<TArgs = StrictArgs> = GenericStoryContext<AngularRenderer, TArgs>;

                                                    type StoryFn

                                                    type StoryFn<TArgs = Args> = AnnotatedStoryFn<AngularRenderer, TArgs>;
                                                    • Story function that represents a CSFv2 component example.

                                                      See Also

                                                      • [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)

                                                    type StoryObj

                                                    type StoryObj<TArgs = Args> = StoryAnnotations<AngularRenderer, TArgs>;
                                                    • Story function that represents a CSFv3 component example.

                                                      See Also

                                                      • [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)

                                                    Package Files (6)

                                                    Dependencies (28)

                                                    Dev Dependencies (23)

                                                    Peer Dependencies (17)

                                                    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/angular.

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