Open oalexdoda opened 4 years ago
+1, I am also looking for a solution to this
I saw other libraries adding an attribute to the main component, in this case
For example:
import styles from './styles.module.scss';
...
<Slider className={ styles.slider } dynamicClasses={{ arrows: styles.arrows, slide: styles.slide, ... }}>
...
</Slider>
+1 I think the modern way to install a module, the module takes care of installing other dependencies It should be automatically installed and the css should be scoped, like material UI and other libs do, with the possibility to change styles
When using the library with Next.js, you can't include the styles at a component level just for the pages / components using the slider. You have to import it globally, causing additional unnecessary CSS.
There should be a parameter for the
<Slider>
component that includes the defaultslick.css
andslick-theme.css
, such as: