diff --git a/README.md b/README.md index be1ac51..a66e817 100644 --- a/README.md +++ b/README.md @@ -389,3 +389,89 @@ export default props => ( /> ); ``` + +## Guide + +### Move form above keyboard + +The purpose of this section is to give you a solution to create a bottom form which will go up when the keyboard appears, and the content at the top at the page will disappear. + +You have to: + +* Create a form like you learnt above ; +* Use [react-native-keyboard-spacer](https://github.com/Andr3wHur5t/react-native-keyboard-spacer): it will create view with the keyboard's size when the keyboard will opened; +* Use [react-native-hide-with-keyboard](https://github.com/bamlab/react-native-hide-with-keyboard): it will hide component when the keyboard will opened. + +```javascript +import React, { PureComponent } from "react"; +import { Image, Platform, ScrollView } from "react-native"; +import Hide from "react-native-hide-with-keyboard"; +import KeyboardSpacer from "react-native-keyboard-spacer"; +import { Formik } from "formik"; +import { Button, FormFormik, TextInputFormik } from "./components"; +const cat = require("./cat.jpg"); + +class AdoptACat extends PureComponent<{}> { + render() { + return ( + + + + + + {}} + render={props => ( + + + +