react-native-paper
Version:
Material design for React Native
154 lines • 4.59 kB
TypeScript
declare type ARGBTheme = ReturnType<typeof argbThemeFromColor>;
declare type CSSTheme = Record<keyof ARGBTheme, string>;
declare type RGBColorList = {
primary: string;
secondary?: string;
tertiary?: string;
custom?: [string, string][];
};
declare type CustomTheme = RGBColorList & {
type: 'light' | 'dark';
};
declare const argbThemeFromColor: (color: string, type?: 'light' | 'dark') => {
primary: number;
onPrimary: number;
primaryContainer: number;
onPrimaryContainer: number;
secondary: number;
onSecondary: number;
secondaryContainer: number;
onSecondaryContainer: number;
tertiary: number;
onTertiary: number;
tertiaryContainer: number;
onTertiaryContainer: number;
error: number;
onError: number;
errorContainer: number;
onErrorContainer: number;
background: number;
onBackground: number;
surface: number;
onSurface: number;
surfaceVariant: number;
onSurfaceVariant: number;
outline: number;
outlineVariant: number;
shadow: number;
scrim: number;
inverseSurface: number;
inverseOnSurface: number;
inversePrimary: number;
};
export declare const hexThemeFromColor: (color: string, type?: 'light' | 'dark') => CSSTheme;
export declare const getPreviewColors: (theme: Record<string, any>) => [string, any][];
export declare const getMatchingColor: (colorName: string, theme: Record<string, any>) => any;
export declare const prepareVariant: ({ primary, secondary, tertiary, type, custom, }: CustomTheme) => {
surfaceDisabled: string;
onSurfaceDisabled: string;
backdrop: string;
elevation: Record<string, string>;
primary: string;
background: string;
surface: string;
error: string;
onSurface: string;
primaryContainer: string;
secondary: string;
secondaryContainer: string;
tertiary: string;
tertiaryContainer: string;
surfaceVariant: string;
errorContainer: string;
onPrimary: string;
onPrimaryContainer: string;
onSecondary: string;
onSecondaryContainer: string;
onTertiary: string;
onTertiaryContainer: string;
onSurfaceVariant: string;
onError: string;
onErrorContainer: string;
onBackground: string;
outline: string;
outlineVariant: string;
inverseSurface: string;
inverseOnSurface: string;
inversePrimary: string;
shadow: string;
scrim: string;
};
export declare const prepareThemes: (colors: RGBColorList) => {
light: {
surfaceDisabled: string;
onSurfaceDisabled: string;
backdrop: string;
elevation: Record<string, string>;
primary: string;
background: string;
surface: string;
error: string;
onSurface: string;
primaryContainer: string;
secondary: string;
secondaryContainer: string;
tertiary: string;
tertiaryContainer: string;
surfaceVariant: string;
errorContainer: string;
onPrimary: string;
onPrimaryContainer: string;
onSecondary: string;
onSecondaryContainer: string;
onTertiary: string;
onTertiaryContainer: string;
onSurfaceVariant: string;
onError: string;
onErrorContainer: string;
onBackground: string;
outline: string;
outlineVariant: string;
inverseSurface: string;
inverseOnSurface: string;
inversePrimary: string;
shadow: string;
scrim: string;
};
dark: {
surfaceDisabled: string;
onSurfaceDisabled: string;
backdrop: string;
elevation: Record<string, string>;
primary: string;
background: string;
surface: string;
error: string;
onSurface: string;
primaryContainer: string;
secondary: string;
secondaryContainer: string;
tertiary: string;
tertiaryContainer: string;
surfaceVariant: string;
errorContainer: string;
onPrimary: string;
onPrimaryContainer: string;
onSecondary: string;
onSecondaryContainer: string;
onTertiary: string;
onTertiaryContainer: string;
onSurfaceVariant: string;
onError: string;
onErrorContainer: string;
onBackground: string;
outline: string;
outlineVariant: string;
inverseSurface: string;
inverseOnSurface: string;
inversePrimary: string;
shadow: string;
scrim: string;
};
};
export {};
//# sourceMappingURL=themes.d.ts.map