mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-07 20:40:20 +00:00
added keyboard avoiding view and scroll view to form.js
This commit is contained in:
1 parent
d22b5decda
commit
6cd703af33
1 file changed
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
import {StyleSheet, Text, TextInput, View} from "react-native";
|
import {KeyboardAvoidingView, ScrollView, StyleSheet, Text, TextInput, View} from "react-native";
|
||||||
import {Picker} from "@react-native-picker/picker";
|
import {Picker} from "@react-native-picker/picker";
|
||||||
|
|
||||||
import {Button, ButtonTray} from "./Button";
|
import {Button, ButtonTray} from "./Button";
|
||||||
@@ -13,17 +13,17 @@ const Form = ({children, onSubmit, onCancel, submitLabel, submitIcon}) => {
|
|||||||
// View -----------------------
|
// View -----------------------
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.formContainer}>
|
<KeyboardAvoidingView style={styles.formContainer}>
|
||||||
|
|
||||||
<View style={styles.formItems}>
|
<ScrollView contentContainerStyle={styles.formItems}>
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</ScrollView>
|
||||||
|
|
||||||
<ButtonTray>
|
<ButtonTray>
|
||||||
<Button label='Cancel' icon={<Icons.Close/>} onClick={onCancel}/>
|
<Button label='Cancel' icon={<Icons.Close/>} onClick={onCancel}/>
|
||||||
<Button label={submitLabel} icon={submitIcon} onClick={onSubmit}/>
|
<Button label={submitLabel} icon={submitIcon} onClick={onSubmit}/>
|
||||||
</ButtonTray>
|
</ButtonTray>
|
||||||
</View>
|
</KeyboardAvoidingView>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user