Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
Removed un-needed Container
Browse files Browse the repository at this point in the history
  • Loading branch information
dilan-dio4 committed Jun 4, 2021
1 parent 484afb1 commit 0ac13d7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion native-example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2897,7 +2897,7 @@
"version" "0.1.2"

"easybase-react@github:easybase/easybase-react#dev":
"resolved" "git+ssh://git@github.com/easybase/easybase-react.git#99dfd2a7710f42b1efb8ab56d38a56b7a63d8ec1"
"resolved" "git+ssh://git@github.com/easybase/easybase-react.git#484afb17adb4f2fbf41d1a50a4b8b3b5ed5374d3"
"version" "2.1.15"
dependencies:
"easybasejs" "4.2.13"
Expand Down
6 changes: 3 additions & 3 deletions src/ui/NativeAuth/NativeAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, lazy, Suspense, Fragment, useEffect } from 'react';
import { ThemeProvider } from 'styled-components/native';
import { defaultDictionary } from '../utils';
import { INativeAuth } from '../uiTypes';
import { Toast, Container } from './components';
import { Toast } from './components';

const { useEasybase } = require('easybase-react');

Expand Down Expand Up @@ -72,9 +72,9 @@ export default function ({ customStyles, children, dictionary, signUpFields }: I
return (
<ThemeProvider theme={typeof customStyles === "object" ? customStyles : {}}>
<Toast toastMessage={toastMessage} toastOpen={toastOpen} setToastOpen={setToastOpen} />
<Container behavior="position" enabled>
{/* <Container behavior="position" enabled> */}
{getCurrentPage()}
</Container>
{/* </Container> */}
</ThemeProvider>
)
}
Expand Down
46 changes: 24 additions & 22 deletions src/ui/NativeAuth/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,33 @@ export const MainView = styled(View)({

export const FormRoot = styled.ScrollView((props: any) => ({
backgroundColor: '#fff',
paddingTop: '20%',
paddingBottom: '10%',
paddingRight: 33,
paddingLeft: 33,
flexGrow: 1,
flex: 1,
...(props.theme.form ? { ...props.theme.form } : {})
}))

export const Form = (props: any) => <FormRoot
keyboardShouldPersistTaps="handled"
keyboardDismissMode="on-drag"
contentContainerStyle={{ flexGrow: 1 }}
bounces={false}
alwaysBounceVertical={false}
>
<View style={{ flex: 1, justifyContent: 'space-between', alignItems: 'center' }}>
{props.children}
</View>
</FormRoot>

export const Container = styled.KeyboardAvoidingView((props: any) => ({
flex: 1,
justifyContent: 'center',
...(props.theme.container ? { ...props.theme.container } : {})
}))
export const Form = (props: any) => <FormRoot
keyboardShouldPersistTaps="handled"
keyboardDismissMode="on-drag"
contentContainerStyle={{
flexGrow: 1,
paddingTop: '20%',
paddingBottom: '10%',
paddingRight: 33,
paddingLeft: 33
}}
bounces={false}
alwaysBounceVertical={false}
>
<View style={{ flex: 1, justifyContent: 'space-between', alignItems: 'center' }}>
{props.children}
</View>
</FormRoot>

// export const Container = styled.KeyboardAvoidingView((props: any) => ({
// flex: 1,
// justifyContent: 'center',
// ...(props.theme.container ? { ...props.theme.container } : {})
// }))

export const HeaderText = styled.Text((props: any) => ({
fontSize: 37,
Expand Down

0 comments on commit 0ac13d7

Please sign in to comment.