@3mo/style-property
v1.1.1
Published
A decorator for component properties backed by one of the host's inline styles, CSS custom properties included.
Readme
Style Property
A decorator for component properties backed by one of the host's inline styles, CSS custom properties included.
Installation
npm install @3mo/style-propertyimport { styleProperty } from '@3mo/style-property'Examples
- Default — Setting the property, here through its attribute, writes the custom property
--story-swatch-colorinto the host's inline style. - Converter — A
styleConvertertranslates between the property and the style, here a number of pixels intoinline-size.
API
Exports
| Name | Kind | Description |
| --- | --- | --- |
| styleProperty | const | A decorator for a property stored in one of the host's inline styles, CSS custom properties included. |
Links
License
MIT © 3MO GmbH
