Include styles with the <Slider> component to avoid unnecessary global styles.
Aperta
- Lingua principale
- JavaScript
- Stelle
- 11.9k
- Fork
- 2.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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 `` component that includes the default `slick.css` and `slick-theme.css`, such as:
```
const settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 4,
slidesToScroll: 4,
styles: true
};
...
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.