forked from tokkozhin/react-native-neomorph-shadows
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
82 lines (69 loc) · 1.95 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
declare module 'react-native-neomorph-shadows' {
import * as React from 'react';
import type { ViewProps, ViewStyle, StyleProp } from 'react-native';
/**
* Defines all flex properties
*/
type FlexStyleProperties =
| 'flex'
| 'alignSelf'
| 'flexGrow'
| 'flexShrink'
| 'flexBasis';
/**
* View styles without flex properties because they are not supported
*/
type ViewStyleWithoutFlex = Pick<
StyleProp<ViewStyle>,
Exclude<keyof StyleProp<ViewStyle>, FlexStyleProperties>
>;
interface ViewStyleWithShadow extends ViewStyleWithoutFlex {
shadowOffset?: {
width: number;
height: number;
};
shadowOpacity?: number;
shadowColor?: string;
shadowRadius?: number;
borderRadius?: number;
backgroundColor?: string;
width: number;
height: number;
}
interface ViewStyleWithNeomorphShadow extends ViewStyleWithoutFlex {
shadowRadius?: number;
borderRadius?: number;
backgroundColor?: string;
width: number;
height: number;
}
interface ShadowProps extends ViewProps {
inner?: boolean;
useArt?: boolean;
style?: ViewStyleWithShadow;
}
interface ShadowFlexProps extends ShadowProps {
style?: StyleProp<ViewStyle>;
}
const Shadow: React.FC<ShadowProps>;
const ShadowFlex: React.FC<ShadowFlexProps>;
interface NeomorphProps extends ViewProps {
inner?: boolean;
swapShadows?: boolean;
style?: ViewStyleWithNeomorphShadow;
lightShadowColor?: string;
darkShadowColor?: string;
}
interface NeomorphFlexProps extends NeomorphProps {
style?: StyleProp<ViewStyle>;
}
const Neomorph: React.FC<NeomorphProps>;
const NeomorphFlex: React.FC<NeomorphFlexProps>;
interface NeomorphBlurProps extends ViewProps {
inner?: boolean;
useArt?: boolean;
style?: ViewStyleWithNeomorphShadow;
}
const NeomorphBlur: React.FC<NeomorphBlurProps>;
export { Shadow, ShadowFlex, Neomorph, NeomorphFlex, NeomorphBlur };
}