Open pattard opened 8 years ago
just include themes/index.css from node_modules, this css file includes 3 themes (bootstrap3, material & default), the file is also available on npmcdn (https://npmcdn.com/react-selectize@2.0.1/dist/index.min.css)
there is an example on how to use theme
in the examples page: http://furqanzafar.github.io/react-selectize/#/?category=simple&example=themes
the theme prop simply adds the prop value to the class name of the root div element, to create new themes you just need to implement these classes https://github.com/furqanZafar/react-selectize/blob/master/themes/bootstrap3.styl (in this case, replace bootstrap3 with the name of your theme)
I love the default and the material designs, but feedback: I could use with more comments in the css to understand exactly what is needed / where for customization which inevitably has to occur :)
Is there an example of how to import this theme so the css is scoped to the component?
Like
import theme from 'react-selectize/index.css'
?
There is a reference to custom themes inside API.md.
I'm not sure where to put the custom theme or even how to go about requiring.