Browse Source

Make TextInput like prototype

master
GabrielTrettel 4 years ago
parent
commit
c5ee77a9a6
  1. 12
      src/app/components/TextInput.js
  2. 2
      src/app/config/colors.js

12
src/app/components/TextInput.js

@ -1,7 +1,7 @@
import React from "react";
import { View, TextInput, StyleSheet } from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import colors from "../config/colors";
import defaultStyles from "../config/styles";
function AppTextInput({ icon, width = "100%", ...otherProps }) {
@ -16,8 +16,8 @@ function AppTextInput({ icon, width = "100%", ...otherProps }) {
/>
)}
<TextInput
placeholderTextColor={defaultStyles.colors.medium}
style={defaultStyles.text}
placeholderTextColor={colors.medium}
{...otherProps}
/>
</View>
@ -26,10 +26,12 @@ function AppTextInput({ icon, width = "100%", ...otherProps }) {
const styles = StyleSheet.create({
container: {
backgroundColor: defaultStyles.colors.light,
borderRadius: 25,
backgroundColor: colors.white,
borderRadius: 6,
borderColor: colors.medium,
borderWidth: 1,
padding: 10,
flexDirection: "row",
padding: 15,
marginVertical: 10,
},
icon: {

2
src/app/config/colors.js

@ -7,7 +7,7 @@ export default {
light: "#f8f4f4",
dark: "#0c0c0c",
danger: "#ff5252",
lightGray: "#d3d3d3",
lightGray: "#C4C4C4",
gray: "gray",
lightestGray: "#F0F0F0",
cerulean: "#006493",

Loading…
Cancel
Save