Skip to content

Commit db26e21

Browse files
committed
πŸ§‘β€πŸ’»(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.
1 parent fe8eb4b commit db26e21

19 files changed

+1768
-2350
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@gouvfr-lasuite/cunningham-tokens": minor
3+
---
4+
5+
Add getThemesFromGlobals util

β€Ž.gitignoreβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ env.d
3333
.turbo
3434
ghpages-output
3535

36+
# Project ignore files
3637
packages/react/chromatic.config.json
38+
packages/tokens/src/lib/cunningham.ts

0 commit comments

Comments
Β (0)