@furystack/shades
Version:
A lightweight UI framework for FuryStack with JSX support
18 lines • 565 B
JavaScript
/**
* Wraps a Shade factory with a baked-in `style` overlay. Baked-in `styles`
* win over caller-supplied `style` props (the wrapper merges last). Use to
* specialise an existing Shade (e.g. theme variants) without registering
* a new custom element.
*/
export const styledShade = (element, styles) => {
return (props, childrenList) => {
return element({
...props,
style: {
...props.style,
...styles,
},
}, childrenList);
};
};
//# sourceMappingURL=styled-shade.js.map