react-storybook-addon-props-combinations:给定每个道具的可能值,使用道具值的所有组合呈现组件

时间:2021-02-03 08:34:54
【文件属性】:
文件名称:react-storybook-addon-props-combinations:给定每个道具的可能值,使用道具值的所有组合呈现组件
文件大小:75KB
文件格式:ZIP
更新时间:2021-02-03 08:34:54
react addon storybook StorybookJavaScript 适用于道具组合插件 给定每个道具的可能值,使用道具值的所有组合渲染组件。 对于查找边缘情况或一次查看所有组件状态很有用。 安装 安装它: npm i -D react-storybook-addon-props-combinations 然后在.storybook/config.js设置插件: import { configure } from '@storybook/react' import { setDefaults } from 'react-storybook-addon-props-combinations' setDefaults ( { // overwrite global defaults here } ) configure ( ( ) => { // ... } , module ) 基本用法 import React from 'react' ; import { storiesOf } from '@storybook/react' ; import { action } from '@storybook/addon-actions' ; im
【文件预览】:
react-storybook-addon-props-combinations-master
----yarn.lock(227KB)
----src()
--------CombinationRenderer.js(864B)
--------ErrorDisplay.jsx(422B)
--------utils.js(1KB)
--------utils.test.js(1014B)
--------index.js(2KB)
--------modifiers.js(258B)
--------modifiers.test.js(772B)
----.babelrc(48B)
----.npmignore(9B)
----.storybook()
--------webpack.config.js(349B)
--------config.js(281B)
----.travis.yml(38B)
----example()
--------combinationsModifier.story.js(2KB)
--------mustProvideAllProps.story.js(1KB)
--------basicUsage.story.js(632B)
--------customCombinationRenderer.story.js(580B)
----README.md(5KB)
----dist()
--------CombinationRenderer.js(2KB)
--------utils.js(2KB)
--------ErrorDisplay.js(728B)
--------index.js(3KB)
--------modifiers.js(880B)
----.gitignore(19B)
----package.json(2KB)

网友评论