Package Exports
- @storybook/addon-ondevice-knobs
- @storybook/addon-ondevice-knobs/dist/index
- @storybook/addon-ondevice-knobs/dist/index.js
- @storybook/addon-ondevice-knobs/register
- @storybook/addon-ondevice-knobs/register.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@storybook/addon-ondevice-knobs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Storybook Knobs Addon for react-native
This addon is depcrecated in favour of controls, please only use it for transitioning to CSF, Args and Controls
See examples for migrating from Knobs to Controls in the web Controls Addon README.
Storybook Knobs Addon allows you to edit react props using the Storybook UI using variables inside stories in Storybook.
This is a wrapper for the addon @storybook/addon-knobs Refer to its documentation to understand how to use knobs
Installation
yarn add -D @storybook/addon-ondevice-knobs @storybook/addon-knobs @react-native-community/datetimepicker @react-native-community/sliderConfiguration
Add following content to .storybook/main.ts:
import { StorybookConfig } from '@storybook/react-native';
const main: StorybookConfig = {
addons: ['@storybook/addon-ondevice-knobs'],
};
export default main;Make sure to use the withKnobs decorator when using knobs import { withKnobs } from '@storybook/addon-ondevice-knobs';