mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
19 lines
571 B
TypeScript
19 lines
571 B
TypeScript
|
import React, { useMemo } from 'react';
|
||
|
import { StyleSheet, ViewProps } from 'react-native';
|
||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||
|
|
||
|
import { useTheme } from './themes';
|
||
|
|
||
|
const SafeArea = (props: ViewProps) => {
|
||
|
const { style, ...otherProps } = props;
|
||
|
const { colors } = useTheme();
|
||
|
|
||
|
const componentStyle = useMemo(() => {
|
||
|
return StyleSheet.compose({ flex: 1, backgroundColor: colors.background }, style);
|
||
|
}, [colors.background, style]);
|
||
|
|
||
|
return <SafeAreaView style={componentStyle} {...otherProps} />;
|
||
|
};
|
||
|
|
||
|
export default SafeArea;
|