3 ms·
With styles in components, can you support skinnable components? If so, do you have to accept parameters in the component and modify the component every time yo
by dsego 7y ago
With styles in components, can you support skinnable components? If so, do you have to accept parameters in the component and modify the component every time you want to change some style to make it fit with your page look and feel?
- e12e 7y agoI recently came across this, you might find the approach interesting (even if not using the CodyHouse framework as such): https://codyhouse.co/blog/post/css-custom-properties-vs-sass-variables https://codyhouse.co/blog/post/css-custom-properties-vs-sass...
- tekkk 7y agoIf you mean theming components, then yes. Skinnable components is not a term I've encountered before but theming is something SC enables and is part of its core functionality. You can either use something like a global theme variable to set styles, which each component can depend on or just the regular props for different styles eg <Button intent="success /> I myself have mostly just remained with a one default theme, although adding a dark-theme has crossed my mind several times. It's just that UI features like this are rarely on top of the to-do list.