🧑‍💻(tokens) add getThemesFromGlobals utils

Export a new util method `getThemesFromGlobals` to easily generate theme with
its variant only by providing a partial globals object. By default it returns
both available theme variants (light & dark). Through options you can prefix
variant property keys, only generate theme with a subset of variant and also
overrides/extend theme.
This commit is contained in:
jbpenrath
2025-12-08 20:35:45 +01:00
committed by Jean-Baptiste PENRATH
parent fe8eb4b802
commit db26e21b88
19 changed files with 1766 additions and 2348 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -27,11 +27,11 @@ const THEMES: Record<Theme, Record<Variant, string | undefined>> = {
},
[Theme.REDFLUX]: {
light: undefined,
dark: "redflux",
dark: "redflux-dark",
},
[Theme.BLUENEY]: {
light: undefined,
dark: "blueney",
dark: "blueney-dark",
},
};

View File

@@ -1,5 +1,10 @@
import React from "react";
import { Button, Modal, ModalSize, useModal } from "@gouvfr-lasuite/cunningham-react";
import {
Button,
Modal,
ModalSize,
useModal,
} from "@gouvfr-lasuite/cunningham-react";
const Onboarding = () => {
const modal = useModal({

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long