1 | import * as React from 'react';
|
2 | import { View } from 'react-native';
|
3 |
|
4 | import { BlurProps } from './BlurView.types';
|
5 | import getBackgroundColor from './getBackgroundColor';
|
6 |
|
7 | class BlurView extends React.Component<BlurProps> {
|
8 | render() {
|
9 | const { tint = 'default', intensity = 100, style, ...props } = this.props;
|
10 | const backgroundColor = getBackgroundColor(intensity, tint);
|
11 | return <View {...props} style={[style, { backgroundColor }]} />;
|
12 | }
|
13 | }
|
14 |
|
15 | export default BlurView;
|