Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@storybook/addon-themes
Advanced tools
Switch between multiple themes for you components in Storybook
Storybook Addon Themes can be used which between multiple themes for components inside the preview in Storybook.
Requires Storybook 7.0 or later. If you need to add it to your Storybook, you can run:
npm i -D @storybook/addon-themes
Then, add following content to .storybook/main.js
:
export default {
addons: ['@storybook/addon-themes'],
};
For tool-specific setup, check out the recipes below
Don't see your favorite tool listed? Don't worry! That doesn't mean this addon isn't for you. Check out the "Writing a custom decorator" section of the api reference.
If you want to override your theme for a particular component or story, you can use the themes.themeOverride
parameter.
import React from 'react';
import { Button } from './Button';
export default {
title: 'Example/Button',
component: Button,
// meta level override
globals: { theme: 'dark' },
};
export const Primary = {
args: {
primary: true,
label: 'Button',
},
};
export const PrimaryDark = {
args: {
primary: true,
label: 'Button',
},
// story level override
globals: { theme: 'dark' },
};
FAQs
Switch between multiple themes for you components in Storybook
The npm package @storybook/addon-themes receives a total of 418,781 weekly downloads. As such, @storybook/addon-themes popularity was classified as popular.
We found that @storybook/addon-themes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.