1.0.0 • Published 8 years ago

react-native-keyboard-done-button v1.0.0

Weekly downloads
31
License
MIT
Repository
github
Last release
8 years ago

react-native-keyboard-done-button

Keyboard done button component for React Native. Based on Danleveille`s demo app (ES2015 & React 15.5.0+ improvements).

Installation

$ npm install react-native-keyboard-done-button --save

Usage

import React, { Component } from 'react';
import { View, TextInput } from 'react-native';
import DoneButton from 'react-native-keyboard-done-button';

export default class Test extends Component {
  render() {
    return (
      <View>
        <TextInput
          placeholder="Phone"
          placeholderTextColor="#000"
          returnKeyType="next"
          defaultValue={this.phone}
        />
        <DoneButton
          title="Done!"   //not required, default value = `Done`
          style={{ backgroundColor: 'red' }}  //not required
          doneStyle={{ color: 'green' }}  //not required
        />
      </View>
    );
  }
}