@storybook/web-components

  • Version 8.0.8
  • Published
  • 58.7 kB
  • 8 dependencies
  • MIT license

Install

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

Overview

Storybook web-components renderer

Index

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;

          Interfaces

          interface WebComponentsRenderer

          interface WebComponentsRenderer extends WebRenderer {}

            property component

            component: string;

              property storyResult

              storyResult: StoryFnHtmlReturnType;

                Type Aliases

                type Decorator

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

                  type Loader

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

                    type Meta

                    type Meta<TArgs = Args> = ComponentAnnotations<WebComponentsRenderer, 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<WebComponentsRenderer>;

                      type StoryContext

                      type StoryContext<TArgs = StrictArgs> = StoryContext$1<WebComponentsRenderer, TArgs>;

                        type StoryFn

                        type StoryFn<TArgs = Args> = AnnotatedStoryFn<WebComponentsRenderer, 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<WebComponentsRenderer, TArgs>;
                        • Story object 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 (2)

                        Dependencies (8)

                        Dev Dependencies (6)

                        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>