
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
storybook-addon-jss-theme
Advanced tools
yarn add -D storybook-addon-jss-theme
To get this addon in your story book you have to register the panel and add story decorator
Add to .storybook/addons.js
import 'storybook-addon-jss-theme/dist/register';
addDecorator to .storybook/config.js
import {addDecorator} from '@storybook/react';
import {withThemesProvider} from 'storybook-addon-jss-theme';
const themes = [theme1, theme2];
addDecorator(withThemesProvider(themes));
or
addDecorator to particular stories
import {withThemesProvider} from 'storybook-addon-jss-theme';
const themes = [theme1, theme2];
storiesOf("demo", module)
.addDecorator(withThemesProvider(themes))
.add("themed component", () => <JSSThemedComponent />);
To run provided example execute following command, storybook will run on port 3000
yarn example
Theme object must contain two fields
name
(string): This contains the theme name displayed in Themes panelvariables
(object): This object holds all theme variablesconst defaultTheme = {
name: 'DEFAULT',
variables: {
backgroundColor: 'lightgrey',
textColor: 'black',
borderRadius: '30px'
}
};
withThemesProvider
withThemesProvider
decorator takes one required argument which is an array of themes (look above for shape of theme object)
and second (optional) which is a ThemeProvider component for custom theme providers created with JSS's createTheme function
withThemesProvider(themes[, ThemeProvider])
FAQs
storybook addon with jss theme
We found that storybook-addon-jss-theme demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.