-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
47 lines (41 loc) · 1.32 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { ViewStyle, TextStyle, ImageStyle } from "react-native";
interface StringifiedStyles {
fontSize?: string | number;
letterSpacing?: string | number;
lineHeight?: string | number;
borderBottomLeftRadius?: string | number;
borderBottomRightRadius?: string | number;
borderTopLeftRadius?: string | number;
borderTopRightRadius?: string | number;
borderBottomWidth?: string | number;
borderTopWidth?: string | number;
borderRightWidth?: string | number;
borderLeftWidth?: string | number;
borderRadius?: string | number;
shadowRadius?: string | number;
borderWidth?: string | number;
translateX?: string | number;
translateY?: string | number;
}
type Config = {
baseWidth?: number;
deviceWidth?: number;
maxScale?: number;
minScale?: number;
};
type NamedStyles<T> = {
[P in keyof T]: ViewStyle | TextStyle | ImageStyle | StringifiedStyles;
};
export namespace ScaledSheet {
function create<T extends NamedStyles<T> | NamedStyles<any>>(
styles: T | NamedStyles<T>
): T;
function initialize(config: Config): void;
function scale(value: number): number;
function original(value: number): string;
const absoluteFill;
const absoluteFillObject;
}
export function initialize(config: Config): void;
export function scale(value: number): number;
export function original(value: number): any;