1*3b155a65S猫头猫import React from 'react'; 2*3b155a65S猫头猫import {StyleProp, ViewStyle} from 'react-native'; 3*3b155a65S猫头猫import {SafeAreaView} from 'react-native-safe-area-context'; 4*3b155a65S猫头猫 5*3b155a65S猫头猫interface IVerticalSafeAreaViewProps { 6*3b155a65S猫头猫 mode?: 'margin' | 'padding'; 7*3b155a65S猫头猫 children: JSX.Element | JSX.Element[]; 8*3b155a65S猫头猫 style?: StyleProp<ViewStyle>; 9*3b155a65S猫头猫} 10*3b155a65S猫头猫export default function VerticalSafeAreaView( 11*3b155a65S猫头猫 props: IVerticalSafeAreaViewProps, 12*3b155a65S猫头猫) { 13*3b155a65S猫头猫 const {children, style, mode} = props; 14*3b155a65S猫头猫 return ( 15*3b155a65S猫头猫 <SafeAreaView style={style} mode={mode} edges={['top', 'bottom']}> 16*3b155a65S猫头猫 {children} 17*3b155a65S猫头猫 </SafeAreaView> 18*3b155a65S猫头猫 ); 19*3b155a65S猫头猫} 20