UNPKG

482 BTypeScriptView Raw
1import * as React from 'react';
2import { View } from 'react-native';
3
4import { BlurProps } from './BlurView.types';
5import getBackgroundColor from './getBackgroundColor';
6
7class 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
15export default BlurView;