@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
Functions
Interfaces
Type Aliases
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. UseStoryObj
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)
- @storybook/builder-webpack5
- @storybook/cli
- @storybook/client-logger
- @storybook/core-client
- @storybook/core-common
- @storybook/core-events
- @storybook/core-server
- @storybook/core-webpack
- @storybook/docs-tools
- @storybook/global
- @storybook/manager-api
- @storybook/node-logger
- @storybook/preview-api
- @storybook/telemetry
- @storybook/types
- @types/node
- @types/react
- @types/react-dom
- @types/semver
- @types/webpack-env
- find-up
- read-pkg-up
- semver
- telejson
- ts-dedent
- tsconfig-paths-webpack-plugin
- util-deprecate
- webpack
Dev Dependencies (23)
- @angular-devkit/architect
- @angular-devkit/build-angular
- @angular-devkit/core
- @angular/animations
- @angular/cli
- @angular/common
- @angular/compiler
- @angular/compiler-cli
- @angular/core
- @angular/forms
- @angular/platform-browser
- @angular/platform-browser-dynamic
- @types/rimraf
- @types/tmp
- cross-spawn
- jest
- jest-preset-angular
- jest-specific-snapshot
- rimraf
- tmp
- typescript
- webpack
- zone.js
Peer Dependencies (17)
Badge
To add a badge like this oneto 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[](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>
- Updated .
Package analyzed in 4624 ms. - Missing or incorrect documentation? Open an issue for this package.