xref: /MusicFree/src/components/base/horizontalSafeAreaView.tsx (revision 6613e77203923e5b1742a49281bfa5de03fc1440)
1import React from 'react';
2import {StyleProp, ViewStyle} from 'react-native';
3import {SafeAreaView} from 'react-native-safe-area-context';
4
5interface IHorizontalSafeAreaViewProps {
6    mode?: 'margin' | 'padding';
7    children: JSX.Element | JSX.Element[];
8    style?: StyleProp<ViewStyle>;
9}
10export default function HorizontalSafeAreaView(
11    props: IHorizontalSafeAreaViewProps,
12) {
13    const {children, style, mode} = props;
14    return (
15        <SafeAreaView style={style} mode={mode} edges={['right', 'left']}>
16            {children}
17        </SafeAreaView>
18    );
19}
20