@storybook-extras/toolbars
v0.0.68
Published
Storybook addon for adding custom toolbar buttons.
Downloads
544
Maintainers
Readme
Getting started
- Install the addon:
yarn add @storybook-extras/toolbars -D
- Add the addon
// .storybook/main.ts
import { StorybookConfig } from '@storybook/angular';
import { ExtrasConfig } from '@storybook-extras/preset';
const config: StorybookConfig & ExtrasConfig = {
...
"addons": [
"@storybook-extras/toolbars",
// it will be included automatically if you are using
// "@storybook-extras/preset",
...
],
...
}
export default config;
How to use
- Simply enable the toolbars through the toolbar or using the parameters like so:
// .storybook/preview.ts
// button.stories.ts
parameters: {
toolbars: [
{
key:'myToolbar',
title:'My Toolbar',
icon:'globe',
// OR emoji: '🌍',
},
],
};