Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Jul 16, 2024
2 parents 4b87c12 + 1c7c0e5 commit 3c74aff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 5 additions & 4 deletions example-ts/src/pages/components/Badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import {
Alert,
Badge,
BadgeGroup,
Breadcrumb,
Col,
Container,
Link,
Row,
Col,
Title,
Text,
Link,
Breadcrumb,
Title,
} from "@dataesr/dsfr-plus";

import Playground from "../../components/Playground";

const badge = `
Expand Down
12 changes: 12 additions & 0 deletions src/hooks/useDSFRConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ export const DSFRConfig = ({
} else {
console.error("dsfr.start is not a function");
}
(window as any).dsfr = {
verbose,
mode: "manual",
};

// @ts-expect-error
await import("@gouvfr/dsfr/dist/dsfr/dsfr.module.min");
await import("@gouvfr/dsfr/dist/utility/utility.css");
await import("@gouvfr/dsfr/dist/dsfr.css");
// @ts-expect-error
window.dsfr.start();
setDSFRStarted(true);
};
const defaultPreferedTheme = window.matchMedia(
"(prefers-color-scheme: dark)"
Expand Down

0 comments on commit 3c74aff

Please sign in to comment.