react-native-safe-area-context
Version:
A flexible way to handle safe area, also works on Android and web.
14 lines (11 loc) • 586 B
text/typescript
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
import type { ViewProps, HostComponent } from 'react-native';
export interface NativeProps extends ViewProps {
mode?: WithDefault<'padding' | 'margin', 'padding'>;
// Should be `'top' | 'right' | 'bottom' | 'left'` but that generates invalid code.
edges?: readonly string[];
}
export default codegenNativeComponent<NativeProps>('RNCSafeAreaView', {
interfaceOnly: true,
}) as HostComponent<NativeProps>;