Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@storybook/addon-themes
Advanced tools
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,
parameters: {
themes: {
themeOverride: 'light', // component level override
},
},
};
export const Primary = {
args: {
primary: true,
label: 'Button',
},
};
export const PrimaryDark = {
args: {
primary: true,
label: 'Button',
},
parameters: {
themes: {
themeOverride: 'dark', // Story level override
},
},
};
7.2.0
This month, we're going to experiment with our launch cycle by making smaller but more frequent releases. Our goal is to bring you new features more quickly, while also smoothing the upgrade process.
Storybook 7.2 is the first of these new, faster releases:
@babel/core
as a dependency - #22450, thanks @valentinpalkovic!jest-mock
- #23597, thanks @ndelangen!expanded
to CoreCommon_StorybookRefs
to fix typescript errors - #23488, thanks @DotwoodMedia!FAQs
Switch between multiple themes for you components in Storybook
The npm package @storybook/addon-themes receives a total of 294,695 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 11 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.