Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
css-chaos-addon
Advanced tools
An addon that applies inheritable css properties around a component to better test random use cases
An addon that applies inheritable css properties around a component to better test in-context scenarios that alter the look and feel of a component. By testing in this way, you can limit style bleeding when the component is added in an application.
Run npm install css-chaos-addon
In your main.js file, add to the addons array:
addons: ["css-chaos-addon"]
The inheritied properties that are set by this addon include:
For more information about these properties, see the properties file here.
Some of the properties have arbitrary values that might be set by a consuming application (ex. color). If you would like to override these values with a set of your own, see the section on customizing the CSS properties.
To customize, you will need to leverage Storybook's parameters feature that can be set globally or at the story level. The parameter used for the CSS Chaos Addon is called cssPropertyData
.
The CSS Property keys include:
If you want to add a css property:
parameters: {
cssPropertyData: [
{
"name": "hello world",
"description": "Lorem ipsum",
"default": "world",
"values": [
"hello",
"world"
]
},
]
,
}
If you want to alter a css property, update one or all keys in the object (name, description, default, values):
parameters: {
cssPropertyData: [
{
"name": "updated-name",
"description": "An updated description goes here",
"default": "new default",
"values": [
"this",
"includes",
"updated",
"values",
"new default"
]
},
]
,
}
To remove an existing css property dropdown from the addon panel, remove all of the values from the object:
parameters: {
cssPropertyData: [
{
"name": "color",
"values": []
},
]
,
}
npm start
runs babel in watch mode and starts Storybooknpm run build
build and package your addon codeFAQs
An addon that applies inheritable css properties around a component to better test random use cases
The npm package css-chaos-addon receives a total of 10 weekly downloads. As such, css-chaos-addon popularity was classified as not popular.
We found that css-chaos-addon 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.