forked from Kureev/react-native-blur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js.flow
55 lines (48 loc) · 1.14 KB
/
index.js.flow
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
// @flow
import * as React from 'react';
import {View} from 'react-native';
type ViewProps = React.ElementProps<typeof View>;
type ViewStyleProp = $PropertyType<ViewProps, 'style'>;
export type BlurType =
| 'xlight'
| 'light'
| 'dark'
// iOS 13+ only
| "chromeMaterial"
| "material"
| "thickMaterial"
| "thinMaterial"
| "ultraThinMaterial"
| "chromeMaterialDark"
| "materialDark"
| "thickMaterialDark"
| "thinMaterialDark"
| "ultraThinMaterialDark"
| "chromeMaterialLight"
| "materialLight"
| "thickMaterialLight"
| "thinMaterialLight"
| "ultraThinMaterialLight"
// tvOS and iOS 10+ only
| 'regular'
| 'prominent'
// tvOS only
| 'extraDark';
export type BlurViewProps = {
blurType?: BlurType,
blurAmount?: number, // 0 - 100,
reducedTransparencyFallbackColor?: String,
style?: ?ViewStyleProp,
};
export class BlurView extends React.Component<BlurViewProps> {
static defaultProps = {
blurType: 'dark',
blurAmount: 10,
};
}
export type VibrancyViewProps = BlurViewProps;
export class VibrancyView extends React.Component<VibrancyViewProps> {
static defaultProps = {
blurAmount: 10,
};
}