You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: Add documentation on how to use default styles with various approaches (webpack, CDN, other 📚
Fixes#42
* feat: Provide uncompressed and compressed assets ✨
Fixes#43
-[With Material Design styles](#styling-and-customization)
41
+
-[Using default styles](#default-styles)
42
+
-[Customizing with Bootstrap, Material Design styles](#customizing-styles)
43
43
-[Performance](#performance)
44
44
-[Search optimizations](#search-optimizations)
45
45
-[Search debouncing](#search-debouncing)
@@ -196,7 +196,46 @@ The text to display as placeholder on the search box. Defaults to `Choose...`
196
196
197
197
## Styling and Customization
198
198
199
-
The component brings minimal styles for bare-bones functional rendering. It is kept purposefully minimal so that user can style/customize it completely to suit their needs. Checkout `/docs` folder for some examples.
199
+
### Default styles
200
+
201
+
The component brings minimal styles for bare-bones functional rendering. It is kept purposefully minimal so that user can style/customize it completely to suit their needs.
202
+
203
+
#### Using WebPack
204
+
205
+
If you're using a bundler like webpack, make sure you configure webpack to import the default styles. To do so, simply add this rule to your webpack config:
206
+
207
+
```js
208
+
// allow webpack to import/bundle styles from node_modules for this component
Note: Above example will always fetch the latest version. To fetch a specific version, use `https://unpkg.com/react-dropdown-tree-select@<version>/dist/styles.css`. Visit [unpkg.com](https://unpkg.com/#/) to see other options.
233
+
234
+
#### Using with other bundlers
235
+
You can reference the files from `node_modules/react-dropdown-tree-select/dist/styles.css` to include in your own bundle via gulp or any other bundlers you have.
236
+
237
+
### Customizing styles
238
+
Once you import default styles, it is easy to add/override the provided styles to match popular frameworks. Checkout `/docs` folder for some examples.
0 commit comments