{"size": 1132, "ext": "js", "max_stars_repo_path": "components/Input.js", "max_stars_repo_name": "santbob/ReactNativeFirebaseAuthStarter", "max_stars_repo_stars_event_min_datetime": "2018-04-28T04:44:23.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-04T08:22:24.000Z", "max_issues_repo_path": "components/Input.js", "max_issues_repo_name": "santbob/ReactNativeFirebaseAuthStarter", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "components/Input.js", "max_forks_repo_name": "santbob/ReactNativeFirebaseAuthStarter", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.1960784314, "max_line_length": 81, "alphanum_fraction": 0.5954063604}
import React, {Component} from 'react';
import { View, StyleSheet, Text, TextInput, Platform } from 'react-native';
import {white, lightGray} from '../utils/colors'

class Input extends Component {
  render() {
    const {label, value, onChangeText, placeholder, secureTextEntry} = this.props
    return (
      <View style={styles.container}>
        <Text style={styles.label}>{ label }</Text>
        <TextInput
          autoCorrect={false}
          onChangeText={onChangeText}
          placeholder={placeholder}
          style={styles.input}
          secureTextEntry={secureTextEntry}
          value={value}
          placeholderTextColor={lightGray}
        />
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    marginTop: 10,
    width: '100%',
    borderColor: '#eee',
    borderBottomWidth: 2,
  },
  label: {
    padding: 5,
    paddingLeft:0,
    color: white,
    fontSize: 17,
    fontWeight: '700',
    width: '100%',
  },
  input: {
    paddingRight: 5,
    paddingLeft: 5,
    paddingBottom: 2,
    color: '#333',
    fontSize: 18,
    width: '100%'
  }
});

export default Input;
