-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styles are missing for the component #42
Comments
what are you using for the templating ? (e.g. bootstrap, reactstrap, material) |
I'm using the Vanilla (no framework) |
I'd suggest following the original documentation for styling guides. |
@sarada-Cheukupalli When you do import DropdownTreeSelect from 'react-dropdown-tree-select' a bundler like webpack will also import the styles, provided you allow for it: // allow webpack to import/bundle styles from node_modules for this component
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [{
loader: 'css-loader'
}]
}),
include: /node_modules[/\\]react-dropdown-tree-select/
}
]
} This will suffice to include vanilla/default styles. If you want to use it with frameworks like Bootstrap/material, you'll also need to provide (in addition to allowing the default styles) some framework specific overrides with your own CSS. E.g. checkout the examples for bootstrap and material-design. The 3rd option, as pointed out by @aseroj, is to completely come up with your own style - and the documentation provides the CSS skeleton that you need to implement to do so. |
Another option to include styles (if you're not using webpack or any bundler) is to reference them from a CDN: https://unpkg.com/react-dropdown-tree-select@1.0.6/dist/styles.css |
…pproaches (webpack, CDN, other Fixes #42
Hi
I just installed this component and tried to run and noticed that it's missing a few styles. I don't see the arrow in select input and the expander symbols for opening and closing the data items. Also, only if I search for a keyword, it would expand the data items as shown in the screen-shots. Please advise!
Thanks!
The text was updated successfully, but these errors were encountered: