![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@ljcl/storybook-addon-cssprops
Advanced tools
Interact with css custom properties dynamically in the Storybook UI
npm i -D @ljcl/storybook-addon-cssprops
Enable the addon in .storybook/main.js
:
module.exports = {
addons: ["@ljcl/storybook-addon-cssprops"],
};
To use it inside MDX, or when customising the docs page:
import { CssPropsBlock } from "@ljcl/storybook-addon-cssprops";
Include your CSS Custom Properties without the initial --
prefix, the addon will apply and document this automatically.
export default {
title: "Simple Component",
parameters: {
cssprops: {
"css-custom-property-1": {
value: "hsl(120deg 100% 25% / 49%)",
description: "Optional description",
},
}
},
} as Meta;
The addon can be configured wherever other parameters can be configured (at the Global, Story, or individual story level). It will also attempt to detect between colour
and text
, this can be overriden by specifying the control
property.
parameters: {
cssprops: {
// Disable the addon by setting disable to true:
disable: false,
// Override the detected default control type:
"override-property-detection-type": {
value: "green",
control: "text",
description: "Maybe you want 'green' for reasons differing to colour"
},
// Override the detected default control type:
"optional-category-or-subcategory": {
value: "red",
category: "Optional",
subcategory: "Very Optional",
description: "This property will be grouped under a category called 'Optional', and then a further subcategory of 'Very Optional'",
},
// Customise preset colours for the colourpicker
presetColors: ['#FFF']
}
}
Modify the docs page based by following the storybook docs. Including <CssPropsBlock />
where you prefer.
This monorepo uses npm@7 workspaces, run npm i
at the root.
FAQs
Interact with css custom properties dynamically in the Storybook UI
The npm package @ljcl/storybook-addon-cssprops receives a total of 4,536 weekly downloads. As such, @ljcl/storybook-addon-cssprops popularity was classified as popular.
We found that @ljcl/storybook-addon-cssprops demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.