Dynamically generating properties from a design token in storybook and using hyphens and underscores as a convention to communicate the scoping of the property. Can't use theme objects because of organizational constraints.
Workaround
Adjust to a flat kebab structure for all environments depending on component library to accommodate the needs of storybook and live with the readability / communication issues.
Manually parse and render variables to style tag for storybook
Environment
npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown
System:
Binaries:
npmPackages:
Proposal
Don't change valid custom property names.
this:
should render this:
not this:
Use Case
Dynamically generating properties from a design token in storybook and using hyphens and underscores as a convention to communicate the scoping of the property. Can't use theme objects because of organizational constraints.
Workaround
style
tag for storybookSteps to reproduce
Set global styles using
GlobalStyles
Inspect variables in browser
Expected Behavior
Variables are rendered as:
Actual Behavior
Variables are rendered as: