Skip to content

Instantly share code, notes, and snippets.

@m4har
Created May 15, 2019 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4har/fd3ae284b9ac6da7788b358f2af871ea to your computer and use it in GitHub Desktop.
Save m4har/fd3ae284b9ac6da7788b358f2af871ea to your computer and use it in GitHub Desktop.
component formInput
// src/components/FormInput/index.js
import React from "react";
import { TextInput, View } from "react-native";
const FormInput = ({ secureTextEntry, ...props }) => (
<View style={styles.container}>
<TextInput
style={styles.textInput}
secureTextEntry={secureTextEntry}
{...props}
/>
</View>
);
const styles = {
container: {
backgroundColor: "rgba(255,255,255,0.3)",
width: "100%",
paddingLeft: 5,
paddingRight: 5,
borderRadius: 10,
margin: 5
},
textInput: {
color: "#fff",
height: 50
}
};
export default FormInput;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment