Skip to content

Commit

Permalink
Merge branch 'main' into fix/29886-distance-stop-button
Browse files Browse the repository at this point in the history
  • Loading branch information
paultsimura committed Nov 7, 2023
2 parents b8d20d0 + f9d9bb6 commit 248b6b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import PropTypes from 'prop-types';
import React from 'react';
import {SafeAreaView} from 'react-native-safe-area-context';
import styles from '@styles/styles';
import SafeAreaProps from './types';

function SafeArea(props) {
function SafeArea({children}: SafeAreaProps) {
return (
<SafeAreaView
style={[styles.iPhoneXSafeArea]}
edges={['left', 'right']}
>
{props.children}
{children}
</SafeAreaView>
);
}

SafeArea.propTypes = {
/** App content */
children: PropTypes.node.isRequired,
};
SafeArea.displayName = 'SafeArea';

export default SafeArea;
1 change: 0 additions & 1 deletion src/components/SafeArea/index.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/components/SafeArea/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SafeAreaProps from './types';

export default ({children}: SafeAreaProps) => children;
5 changes: 5 additions & 0 deletions src/components/SafeArea/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import ChildrenProps from '@src/types/utils/ChildrenProps';

type SafeAreaProps = ChildrenProps;

export default SafeAreaProps;

0 comments on commit 248b6b6

Please sign in to comment.