From df4b3f6608423922d0fefd040ab86d49f97bdc9b Mon Sep 17 00:00:00 2001 From: Leon Jiang <35908040+leonyjiang@users.noreply.github.com> Date: Thu, 9 Jul 2020 10:00:11 -0700 Subject: [TMA-104] Registration wizard & footer positioning fix (#14) * Remove KeyboardAvoidingView and add centered prop * Fix layout to match updated Background component * Add KeyboardAvoidingView to Login screen * Fix arrows/wizard position & fix keyboard avoidance effect --- src/components/onboarding/Background.tsx | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/components/onboarding') diff --git a/src/components/onboarding/Background.tsx b/src/components/onboarding/Background.tsx index 98082022..85675b0d 100644 --- a/src/components/onboarding/Background.tsx +++ b/src/components/onboarding/Background.tsx @@ -5,12 +5,13 @@ import { TouchableWithoutFeedback, Keyboard, ViewProps, - KeyboardAvoidingView, View, - Platform, } from 'react-native'; +import {CenteredView} from '../common'; -interface BackgroundProps extends ViewProps {} +interface BackgroundProps extends ViewProps { + centered?: boolean; +} const Background: React.FC = (props) => { return ( = (props) => { angle={154.72} angleCenter={{x: 0.5, y: 0.5}} style={styles.container}> - - - - {props.children} - - - + + {props.centered ? ( + {props.children} + ) : ( + {props.children} + )} + ); }; @@ -36,9 +35,6 @@ const styles = StyleSheet.create({ container: { flex: 1, }, - view: { - alignItems: 'center', - }, }); export default Background; -- cgit v1.2.3-70-g09d2