@wise/components-theming
Version:
Provides theming support for the Wise Design system components
43 lines (39 loc) • 1.71 kB
text/typescript
// TODO: Change 'light' with 'legacy' in the future
export const baseThemes = ['light', 'personal', 'business'] as const;
export const extraThemes = ['forest-green', 'bright-green'] as const;
export const screenModes = ['light', 'dark'] as const;
export const modernThemes = [baseThemes[1], baseThemes[2], ...extraThemes] as const;
export const businessThemes = [
'business',
'business--forest-green',
'business--bright-green',
] as const;
export const platformThemes = ['platform', 'platform--forest-green'] as const;
// TODO: componentThemes returned back for backward compatibility, refactor this place in the future
export type ComponentTheme = (typeof baseThemes)[number];
export type ModernTheme = (typeof modernThemes)[number];
export type BaseTheme = (typeof baseThemes)[number];
export type ExtraTheme = (typeof extraThemes)[number];
export type ForestGreenTheme = (typeof extraThemes)[0];
export type ScreenMode = (typeof screenModes)[number];
export type ScreenModeDark = (typeof screenModes)[1];
export type PlatformTheme = (typeof platformThemes)[0];
export type PlatformForestGreenTheme = (typeof platformThemes)[1];
export type BusinessTheme = (typeof businessThemes)[0];
export type BusinessForestGreenTheme = (typeof businessThemes)[1];
export type BusinessBrightGreenTheme = (typeof businessThemes)[2];
export const DEFAULT_BASE_THEME = 'light';
export const DEFAULT_SCREEN_MODE = 'light';
export type Theming = {
theme?:
| ComponentTheme
| BaseTheme
| ExtraTheme
| BusinessTheme
| BusinessForestGreenTheme
| BusinessBrightGreenTheme
| PlatformTheme
| PlatformForestGreenTheme;
screenMode?: ScreenMode;
isNotRootProvider?: boolean | undefined;
};