
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
storybook-color-picker
Advanced tools
An addon for Storybook that allows you to quickly find and copy to clipboard any color from your custom color palette.
Created with TypeScript, React and Storybook.
$ npm i storybook-color-picker
In your .storybook folder find main.js file and add this addon like below
module.exports = {
...
"addons": [
...
"storybook-color-picker"
]
}
In your .storybook folder find preview.js file and add your color palette to parameters like below. Scroll down to find out how your corol palette must look like.
import yourFancyColorPalette from './yourFancyColorPalette.json';
export const parameters = {
...
colorPalette: yourFancyColorPalette,
}
type ColorPaletteAsObjecy = Record<string, Record<string, string> | string>;
Example:
{
"light": {
" 500": "#aaa",
" 100": "#eee",
" 400": "#bbb",
" 200": "#ddd",
" 300": "#ccc"
},
"dark": {
"0100": "#888",
"0500": "#000",
"0400": "#222",
"0200": "#666",
"0300": "#444"
}
}
Usefull tip: add white spaces or zeros before numerical keys to prevent auto sorting
type ColorPaletteAsArray = {
label: string,
values: [
{
label: string,
value: string, // valid hex value
}
],
}
Example:
[
{
"label": "light",
"values": [
{
"label": "100",
"value": "#fff"
},
{
"label": "200",
"value": "#aaa"
}
]
},
{
"label": "dark",
"values": [
{
"label": "100",
"value": "#222"
},
{
"label": "200",
"value": "#000000"
}
]
}
]
FAQs
Choose a color from custom color palette and set it on component's control and/or copy it to clipboard.
We found that storybook-color-picker 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.