@splunk/storybook-addon-themes
v0.1.0
Published
Storybook addon for previewing Splunk UI themes
Readme
@splunk/storybook-addon-themes
Storybook addon for previewing Splunk UI components across Splunk theme settings.
The addon adds a toolbar control for switching theme family, color scheme, and density. It also configures Storybook docs to use the selected theme.
Install
Install the addon (below install assumes peer-dependencies are already installed).
npm install --save-dev @splunk/storybook-addon-themesUsage
Add the addon to your Storybook configuration:
// .storybook/main.js
export default {
addons: ['@splunk/storybook-addon-themes'],
};Options
Set these Storybook parameters to configure the toolbar:
splunkThemes: Sets defaultfamily,colorScheme, anddensityvalues.enableSplunkMagneticOption: Shows thesplunk-magneticfamily option.enableSplunk1cdOption: Shows thesplunk-1cdfamily option.disableMultiThemeOptions: Hides thealloption for comparing multiple theme values.
