UNPKG

2.16 kBTypeScriptView Raw
1import type * as React from 'react';
2export declare type Font = {
3 fontFamily: string;
4 fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
5};
6export declare type Fonts = {
7 regular: Font;
8 medium: Font;
9 light: Font;
10 thin: Font;
11};
12declare type Mode = 'adaptive' | 'exact';
13export declare type Theme = {
14 dark: boolean;
15 mode?: Mode;
16 roundness: number;
17 colors: {
18 primary: string;
19 background: string;
20 surface: string;
21 accent: string;
22 error: string;
23 text: string;
24 onSurface: string;
25 disabled: string;
26 placeholder: string;
27 backdrop: string;
28 notification: string;
29 };
30 fonts: Fonts;
31 animation: {
32 scale: number;
33 };
34};
35export declare type $Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
36export declare type $RemoveChildren<T extends React.ComponentType<any>> = $Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
37export declare type EllipsizeProp = 'head' | 'middle' | 'tail' | 'clip';
38declare global {
39 namespace ReactNativePaper {
40 interface ThemeFont {
41 fontFamily: string;
42 fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
43 }
44 interface ThemeFonts {
45 regular: ThemeFont;
46 medium: ThemeFont;
47 light: ThemeFont;
48 thin: ThemeFont;
49 }
50 interface ThemeColors {
51 primary: string;
52 background: string;
53 surface: string;
54 accent: string;
55 error: string;
56 text: string;
57 onSurface: string;
58 disabled: string;
59 placeholder: string;
60 backdrop: string;
61 notification: string;
62 }
63 interface ThemeAnimation {
64 scale: number;
65 }
66 interface Theme {
67 dark: boolean;
68 mode?: Mode;
69 roundness: number;
70 colors: ThemeColors;
71 fonts: ThemeFonts;
72 animation: ThemeAnimation;
73 }
74 }
75}
76export {};