Skip to content

Commit f3cf5c5

Browse files
authored
Change the import location for accordion.css
If an application does not have the `@gouvfr/dsfr` module installed, the following error is expected: ``` ./node_modules/@codegouvfr/react-dsfr/Accordion.js Module not found: Can't resolve '@gouvfr/dsfr/component/accordion/accordion.css' in 'path\to\application\node_modules\@codegouvfr\react-dsfr' ``` Given that the css required is also in the `@codegouvfr/react-dsfr` module, we can locate this css locally in the module and prevent dependency errors. Signed-off-by: Matt Clark <87824367+isMattCoding@users.noreply.github.com>
1 parent 9e92b6f commit f3cf5c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { fr } from "./lib";
55
import { cx } from "./lib/tools/cx";
66
import { symToStr } from "tsafe/symToStr";
77
import { useConstCallback } from "./lib/tools/powerhooks/useConstCallback";
8-
import "@gouvfr/dsfr/dist/component/accordion/accordion.css";
8+
import "./dsfr/component/accordion/accordion.css";
99

1010
export type AccordionProps = AccordionProps.Controlled | AccordionProps.Uncontrolled;
1111

0 commit comments

Comments
 (0)