File tree Expand file tree Collapse file tree 2 files changed +43
-3
lines changed Expand file tree Collapse file tree 2 files changed +43
-3
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,11 @@ export interface BlurViewProperties {
6
6
| "xlight"
7
7
| "light"
8
8
| "dark"
9
- // tvOS only
10
- | "extraDark"
9
+ // tvOS and iOS 10+ only
11
10
| "regular"
12
- | "prominent" ;
11
+ | "prominent"
12
+ // tvOS only
13
+ | "extraDark" ;
13
14
blurAmount ?: number ; // 0 - 100
14
15
style ?: StyleProp < ViewStyle > ;
15
16
viewRef ?: number | null ;
Original file line number Diff line number Diff line change
1
+ // @flow
2
+
3
+ import * as React from 'react';
4
+ import {View} from 'react-native';
5
+
6
+ type ViewProps = React.ElementProps<typeof View>;
7
+ type ViewStyleProp = $PropertyType<ViewProps, 'style'>;
8
+
9
+ export type BlurType =
10
+ | 'xlight'
11
+ | 'light'
12
+ | 'dark'
13
+ // tvOS and iOS 10+ only
14
+ | 'regular'
15
+ | 'prominent'
16
+ // tvOS only
17
+ | 'extraDark';
18
+
19
+ export type BlurViewProps = {
20
+ blurType: BlurType,
21
+ blurAmount: number, // 0 - 100
22
+ style?: ?ViewStyleProp,
23
+ viewRef?: ?React.ElementRef<any>,
24
+ };
25
+
26
+ export class BlurView extends React.Component<BlurViewProps> {
27
+ static defaultProps = {
28
+ blurType: 'dark',
29
+ blurAmount: 10,
30
+ };
31
+ }
32
+
33
+ export type VibrancyViewProps = BlurViewProps;
34
+
35
+ export class VibrancyView extends React.Component<VibrancyViewProps> {
36
+ static defaultProps = {
37
+ blurAmount: 10,
38
+ };
39
+ }
You can’t perform that action at this time.
0 commit comments