-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ModalFormWrapper component for reusable modal form layout
- Loading branch information
1 parent
9f8e993
commit 6537448
Showing
3 changed files
with
139 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { SafeAreaView } from 'react-native'; | ||
import { useBackgroundContainerColor } from '../../styles/theme'; | ||
import { Box, Button, VStack } from 'native-base'; | ||
|
||
export default function ModalFormWrapper({ children, handleSubmit, t }) { | ||
const backgroundColor = useBackgroundContainerColor(); | ||
|
||
return ( | ||
<SafeAreaView style={{ flex: 1, backgroundColor }}> | ||
<VStack | ||
flex={1} | ||
justifyContent="space-between" | ||
style={{ | ||
backgroundColor, | ||
}}> | ||
<Box p="3">{children}</Box> | ||
<Box p="3"> | ||
<Button onPress={handleSubmit}>{t('SUBMIT')}</Button> | ||
</Box> | ||
</VStack> | ||
</SafeAreaView> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters