Byteclaw / visage

Visage design system
https://visage.design
MIT License
12 stars 3 forks source link

Introduce hook that can be used to resolve style sheet object without producing class names #665

Open michalkvasnicak opened 3 years ago

michalkvasnicak commented 3 years ago

For usages where people want to use style sheets from visage but want to pass them to their own css in js solution they should be able to use a hook for this that should be possible a part of core.

const style = useVisageStyles();

return <div css={style({ color: 'primary' })} />

The style object should be defined outside of component scope / in memo hook for performance optimization (caching).