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

2
src/app/config/colors.js

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

Loading…
Cancel
Save