diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 2e8a63a..37874d5 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -1,6 +1,5 @@ import React, { useCallback } from 'react'; import styled, { css } from 'styled-components/native'; -import { Pressable } from 'react-native'; import { useNavigation, StackActions } from '@react-navigation/native'; import useDefaultStyles from './Colors'; @@ -8,12 +7,12 @@ interface Props { fullSize?: boolean; } -const Background = styled(Pressable)` +const Background = styled.View` flex: 1; justify-content: center; `; -const Container = styled(Pressable)>` +const Container = styled.View>` margin: auto 20px; padding: 4px; border-radius: 12px; @@ -27,6 +26,10 @@ const Container = styled(Pressable)>` `} `; +const Spacer = styled.Pressable` + flex: 1; +`; + const Modal: React.FC = ({ children, fullSize = true }) => { const defaultStyles = useDefaultStyles(); const navigation = useNavigation(); @@ -35,10 +38,12 @@ const Modal: React.FC = ({ children, fullSize = true }) => { }, [navigation]); return ( - + + {!fullSize && } {children} + {!fullSize && } ); };