@storybook/addon-knobs
- Version 8.0.1
- Published
- 222 kB
- 11 dependencies
- MIT license
Install
npm i @storybook/addon-knobs
yarn add @storybook/addon-knobs
pnpm add @storybook/addon-knobs
Overview
Storybook addon for editing props
Index
Variables
variable ADDON_ID
const ADDON_ID: string;
variable CHANGE
const CHANGE: string;
variable CLICK
const CLICK: string;
variable PANEL_ID
const PANEL_ID: string;
variable PARAM_KEY
const PARAM_KEY: string;
variable RESET
const RESET: string;
variable SET
const SET: string;
variable SET_OPTIONS
const SET_OPTIONS: string;
Functions
function array
array: ( name: string, value: ArrayTypeKnobValue, separator?: string, groupId?: string) => string[];
function boolean
boolean: (name: string, value: boolean, groupId?: string) => Mutable<boolean>;
function button
button: ( name: string, callback: ButtonTypeOnClickProp, groupId?: string) => undefined;
function color
color: (name: string, value: string, groupId?: string) => string;
function date
date: (name: string, value?: Date, groupId?: string) => number;
function files
files: ( name: string, accept: string, value?: string[], groupId?: string) => string[];
function knob
knob: < T extends | 'number' | 'boolean' | 'object' | 'text' | 'color' | 'select' | 'radios' | 'array' | 'date' | 'button' | 'files' | 'options', V = Mutable<Knob<T>['value']>>( name: string, options: Knob<T>) => V;
function number
number: ( name: string, value: number, options?: NumberTypeKnobOptions, groupId?: string) => number;
function object
object: <T>(name: string, value: T, groupId?: string) => T;
function optionsKnob
optionsKnob: <T extends OptionsTypeKnobSingleValue>( name: string, valuesObj: OptionsTypeOptionsProp<T>, value: OptionsTypeKnobValue<T>, optionsObj: OptionsKnobOptions, groupId?: string) => T;
function radios
radios: <T extends RadiosTypeKnobValue>( name: string, options: RadiosTypeOptionsProp<T>, value: T, groupId?: string) => T;
function select
select: <T extends SelectTypeKnobValue>( name: string, options: SelectTypeOptionsProp<T>, value: T, groupId?: string) => T;
function text
text: (name: string, value: string, groupId?: string) => string;
function withKnobs
withKnobs: (...args: any) => any;
Package Files (2)
Dependencies (11)
Dev Dependencies (30)
- @babel/cli
- @babel/core
- @babel/preset-env
- @babel/preset-react
- @babel/preset-typescript
- @emotion/jest
- @storybook/addon-webpack5-compiler-babel
- @storybook/components
- @storybook/react
- @storybook/react-webpack5
- @testing-library/dom
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- @types/escape-html
- @types/lodash
- @types/node
- @types/react-lifecycles-compat
- @types/react-select
- @types/webpack-env
- auto
- chalk
- concurrently
- jest
- jest-environment-jsdom
- react
- react-dom
- rimraf
- storybook
- typescript
Peer Dependencies (6)
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/addon-knobs
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/addon-knobs)
- HTML<a href="https://www.jsdocs.io/package/@storybook/addon-knobs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2021 ms. - Missing or incorrect documentation? Open an issue for this package.