akiran / akiran/react-slick

Include styles with the <Slider> component to avoid unnecessary global styles.

Offen
#1,852 3 Kommentare 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
11.9k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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
};

...

```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.