Skip to content

Latest commit

 

History

History
33 lines (29 loc) · 941 Bytes

File metadata and controls

33 lines (29 loc) · 941 Bytes

React-Native-Keyboard-Sticky-View

React Native keyboard sticky view with animation

Demo

import React from 'react';
import { TouchableOpacity, StyleSheet, View, TextInput, Text } from 'react-native';
import KeyboardStickyView from 'react-native-keyboard-sticky-view';

export default class KeyboardStickyViewExample extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <View style={styles.textinputWrapper}>
          <TextInput />
        </View>
        <KeyboardStickyView
          onKeyboardShow={f => f}
          onKeyboardHide={f => f}
        >
          { (state, props) => (
            <TouchableOpacity style={styles.btn}>
              <Text>Click</Text>
            </TouchableOpacity>
          )}
        </KeyboardStickyView>
      </View>
    )
  }
}