New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@netsells/storycap-default-background

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netsells/storycap-default-background

This module syncs up the background of your project with the backgrounds selected in your stories parameters when used with [@storybook/addon-background](https://www.npmjs.com/package/@storybook/addon-backgrounds).

latest
npmnpm
Version
0.2.1
Version published
Weekly downloads
159
63.92%
Maintainers
5
Weekly downloads
 
Created
Source

Storycap Background Storybook Decorator

This module syncs up the background of your project with the backgrounds selected in your stories parameters when used with @storybook/addon-background.

Follow the @storybook/addon-background guide for settings up available backgrounds in your stories. This decorator will simply set the background to the value set as default: true in your background options when the story is captured by storycap.

Installation

yarn add -D @netsells/storycap-default-background

Usage

Enable globally:

import withDefaultBackground from '@netsells/storycap-default-background';

export const decorators = [
    withDefaultBackground,
];

Enable on a per story basis:

import withDefaultBackground from '@netsells/storycap-default-background';
import MyComponent from '../../../components/MyComponent';

// Enable for all stories in this file
export default {
    decorators: [
        withDefaultBackground,
    ],
};

export const myComponent = () => ({
    // ...component
});

// Enable for single story
myComponent.decorators = [
    withDefaultBackground,
];

FAQs

Package last updated on 24 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts