Storybook Addon On Device Knobs
Storybook Addon On Device Knobs allow you to edit React props dynamically using the Storybook UI.
You can also use Knobs as a dynamic variable inside stories in Storybook.
Framework Support
This is how Knobs look like:
This addon is a wrapper for addon @storybook/addon-knobs.
Refer to its documentation to understand how to use knobs
Getting Started
First of all, you need to install knobs into your project.
npm install @storybook/addon-ondevice-knobs
Then create a file called rn-addons.js
in your storybook config.
import '@storybook/addon-ondevice-knobs/register';
Then import rn-addons.js
next to your getStorybookUI
call.
import './rn-addons';
Now, write your stories with knobs.
Refer to @storybook/addon-knobs to learn how to write stories.