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

Commit

Permalink
FormRoot new pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
dilan-dio4 committed Jun 4, 2021
1 parent df4a09c commit 9ac1774
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 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#41b50a2b0b9d17159330f8c329eeccad60309ebe"
"resolved" "git+ssh://git@github.com/easybase/easybase-react.git#df4a09c29f698aaa3ff076b4e1f959919ece2f19"
"version" "2.1.15"
dependencies:
"easybasejs" "4.2.13"
Expand Down
6 changes: 3 additions & 3 deletions src/ui/NativeAuth/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export const View = styled.View({
width: "100%"
});

export const Form = styled.ScrollView((props: any) => ({
justifyContent: 'space-between',
alignItems: 'center',
export const FormRoot = styled.ScrollView((props: any) => ({
backgroundColor: '#fff',
paddingTop: '25%',
paddingBottom: '25%',
Expand All @@ -16,6 +14,8 @@ export const Form = styled.ScrollView((props: any) => ({
...(props.theme.form ? { ...props.theme.form } : {})
}))

export const Form = (props: any) => <FormRoot keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag" contentContainerStyle={{ justifyContent: 'space-between', alignItems: 'center' }} {...props} />

export const Container = styled.KeyboardAvoidingView((props: any) => ({
flex: 1,
backgroundColor: '#fff',
Expand Down
2 changes: 1 addition & 1 deletion src/ui/NativeAuth/pages/ForgotPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function ({ setCurrentPage, dictionary, toast }: INativePage) {

if (!onConfirm) {
return (
<Form keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag">
<Form>
<HeaderText>{dictionary.forgotPasswordHeader}</HeaderText>

<View>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/NativeAuth/pages/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function ({ setCurrentPage, dictionary, toast }: INativePage) {
}

return (
<Form keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag">
<Form>
<HeaderText>{dictionary.signInHeader}</HeaderText>

<View>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/NativeAuth/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function ({ setCurrentPage, dictionary, signUpFields, toast }: IS
}

return (
<Form keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag">
<Form>
<HeaderText>{dictionary.signUpHeader}</HeaderText>

<View>
Expand Down

0 comments on commit 9ac1774

Please sign in to comment.