@atlaskit/theme
Version:
Theme contains solutions for global theming, colors, and other useful mixins.
41 lines (40 loc) • 1.01 kB
TypeScript
import { type ReactNode } from 'react';
export type colorPaletteType = '8' | '16' | '24';
export type ThemeModes = 'light' | 'dark';
export interface Theme {
mode: ThemeModes;
}
export interface GlobalThemeTokens extends Theme {
}
export type ThemeProps = AtlaskitThemeProps | CustomThemeProps | NoThemeProps;
export interface CustomThemeProps {
theme: Theme;
[index: string]: any;
}
export interface AtlaskitThemeProps {
theme: {
__ATLASKIT_THEME__: Theme;
};
[index: string]: any;
}
export interface AKThemeProviderProps {
mode?: ThemeModes;
background?: ThemedValue<string>;
children?: ReactNode;
}
export interface NoThemeProps {
[index: string]: any;
}
export type DefaultValue = string | number;
export type ThemedValue<V = DefaultValue> = (props?: ThemeProps) => V | '';
export interface Layers {
card: 100;
navigation: 200;
dialog: 300;
layer: 400;
blanket: 500;
modal: 510;
flag: 600;
spotlight: 700;
tooltip: 9999;
}