(theme) add themes management

This is made in order to be able to handle natively multiple themes
for the future light/dark themes and also allow consumers to create
their own.
This commit is contained in:
Nathan Vasse
2023-09-26 11:38:22 +02:00
committed by NathanVss
parent f232ae1e44
commit cce8eccf5b
24 changed files with 370 additions and 281 deletions

View File

@@ -1,5 +1,5 @@
import "./index.scss";
import { PartialNested } from ":/types";
import { PartialExtendableNested, PartialNested } from ":/types";
import { tokens } from "./cunningham-tokens";
export * from "./components/Button";
@@ -19,5 +19,8 @@ export * from "./components/Pagination";
export * from "./components/Popover";
export * from "./components/Provider";
export type DefaultTokens = PartialNested<typeof tokens>;
export const defaultTokens = tokens;
export type DefaultTokens = PartialNested<typeof tokens.themes.default>;
export const defaultTokens = tokens.themes.default;
export type Configuration = {
themes: Record<string, PartialExtendableNested<typeof tokens.themes.default>>;
};