@netsells/storybook-decorators
This module provides a few helper decorators for your stories.
Last updated 5 months ago by samturrell .
MIT · Original npm · Tarball · package.json
$ cnpm install @netsells/storybook-decorators 
SYNC missed versions from official npm registry.

Netsells Storybook Decorators

This module provides a few helper decorators for your stories.

Decorators

The following decorators are available:

VerticallyCenteredDecorator

Vertically centers your story markup in the view.

HorizontallyCenteredDecorator

Horizontally centers your story markup in the view.

ContainerDecorator

Wraps your story markup in a .container class.

Installation

yarn add @netsells/storybook-decorators

Usage

Enable globally:

import { VerticallyCenteredDecorator } from '@netsells/storybook-decorators';
import { addDecorator } from '@storybook/vue';

addDecorator(VerticallyCenteredDecorator);

Enable in a single story:

import { VerticallyCenteredDecorator } from '@netsells/storybook-decorators';
import MyComponent from '../../../components/MyComponent';

export const myComponent = () => ({
    components: { MyComponent },

    template: '<my-component />',
});

myComponent.story = {
    decorators: [VerticallyCenteredDecorator],
};

Current Tags

  • 0.2.0                                ...           latest (5 months ago)

3 Versions

  • 0.2.0                                ...           5 months ago
  • 0.1.1                                ...           5 months ago
  • 0.1.0                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |