@wise/components-theming
Version:
Provides theming support for the Wise Design system components
27 lines (23 loc) • 1.28 kB
text/typescript
// TODO: Change 'light' with 'legacy' in the future
export const baseThemes = ['light', 'personal'] as const;
export const extraThemes = ['forest-green', 'bright-green'] as const;
export const screenModes = ['light', 'dark'] as const;
export const modernThemes = [baseThemes[1], ...extraThemes] 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 const DEFAULT_BASE_THEME = 'light';
export const DEFAULT_SCREEN_MODE = 'light';
export type Theming = {
theme?: ComponentTheme | BaseTheme | ExtraTheme | PlatformTheme | PlatformForestGreenTheme;
screenMode?: ScreenMode;
isNotRootProvider?: boolean | undefined;
};