🚀 DAY 4 OF LAUNCH WEEK:Introducing Socket Scanning for OpenVSX Extensions.Learn more →
Socket
Book a DemoInstallSign in
Socket

@greenberry/storybook-args

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@greenberry/storybook-args

Create arguments for Storybooks with ease

Source
npmnpm
Version
1.1.1
Version published
Maintainers
6
Created
Source

Storybook Args

Node.js Package

This package holds the util helper for setting up arguments within Storybook. It will automatically arrange the suited controls based on a given value and speed up declaring any custom arguments.

Example

Add arguments by importing the args helper. This will return an array containing the argsTypes key. Meaning you can spread the object withing the export of the story like so:

const types = args([
  {
    name: 'name',
    value: 'Sander',
  },
]);

export default {
  title: 'Component/Example',
  component: Example,
  ...types,
};

Keywords

storybook

FAQs

Package last updated on 07 Sep 2020

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