@storybook/web-components

  • Version 6.4.22
  • Published
  • 48.1 kB
  • 19 dependencies
  • MIT license

Install

npm i @storybook/web-components
yarn add @storybook/web-components
pnpm add @storybook/web-components

Overview

Storybook for web-components: View web components snippets in isolation with Hot Reloading.

Index

Variables

variable addDecorator

const addDecorator: any;

    variable addParameters

    const addParameters: any;

      variable configure

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

        variable forceReRender

        const forceReRender: () => void;

          variable getStorybook

          const getStorybook: () => IStorybookSection[];

            variable raw

            const raw: () => any;

              variable setAddon

              const setAddon: (addon: any) => void;

                variable storiesOf

                const storiesOf: any;

                  Functions

                  function getCustomElements

                  getCustomElements: () => any;

                    function isValidComponent

                    isValidComponent: (tagName: string) => boolean;

                      function isValidMetaData

                      isValidMetaData: (customElements: any) => boolean;

                        function setCustomElements

                        setCustomElements: (customElements: any) => void;
                        • Parameter customElements

                          any for now as spec is not super stable yet

                        function setCustomElementsManifest

                        setCustomElementsManifest: (customElements: any) => void;

                          Type Aliases

                          type Meta

                          type Meta<TArgs = Args> = ComponentAnnotations<WebComponentsFramework, 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 Story

                          type Story<TArgs = Args> = StoryFn<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)

                              NOTE that in Storybook 7.0, this type will be renamed to StoryFn and replaced by the current StoryObj type.

                          type StoryFn

                          type StoryFn<TArgs = Args> = AnnotatedStoryFn<WebComponentsFramework, 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<WebComponentsFramework, 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)

                          type WebComponentsFramework

                          type WebComponentsFramework = {
                          component: string;
                          storyResult: StoryFnHtmlReturnType;
                          };

                            Package Files (4)

                            Dependencies (19)

                            Dev Dependencies (1)

                            Peer Dependencies (1)

                            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/web-components.

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