nx/docs/react/api-react/generators/component-story.md
2021-12-10 12:18:46 -05:00

783 B

title description
@nrwl/react:component-story generator Generate storybook story for a react component

@nrwl/react:component-story

Generate storybook story for a react component

Usage

nx generate component-story ...

By default, Nx will search for component-story in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/react:component-story ...

Show what will be generated without writing to disk:

nx g component-story ... --dry-run

Options

componentPath (required)

Type: string

Relative path to the component file from the library root

project (required)

Type: string

The project name where to add the components.