diff --git a/components/common/app-text-input.js b/components/common/app-text-input.js index 79bcee9491eb33bf15a03ef87c73e80af0fb72b1..389490e98d9e5f8ceb6b5a9fea2f3a9ac3c5eb3f 100644 --- a/components/common/app-text-input.js +++ b/components/common/app-text-input.js @@ -2,24 +2,22 @@ import React from 'react' import PropTypes from 'prop-types' import { StyleSheet, TextInput } from 'react-native' -import { Containers } from '../../styles/redesign' +import { Colors } from '../../styles/redesign' const AppTextInput = ({ autoFocus, onChangeText, placeholder, value, - style, ...props }) => { - if (!Array.isArray(style)) style = [style] return ( <TextInput autoFocus={autoFocus} onChangeText={onChangeText} placeholder={placeholder} - style={[styles.input, ...style]} + style={styles.input} value={value} {...props} /> @@ -30,17 +28,15 @@ AppTextInput.propTypes = { autoFocus: PropTypes.bool, onChangeText: PropTypes.func, placeholder: PropTypes.string, - style: PropTypes.oneOfType([PropTypes.array, PropTypes.object]), value: PropTypes.string, } -AppTextInput.defaultProps = { - style: [] -} - const styles = StyleSheet.create({ input: { - ...Containers.greyBorder + borderColor: Colors.grey, + borderRadius: 5, + borderStyle: 'solid', + borderWidth: 1, } }) diff --git a/styles/containers.js b/styles/containers.js index 32a240478d7bce4cbf9e1d470b899aab07ee9fa0..1d96f0e9e8c412576f39f899dbe5f7c9f9d534af 100644 --- a/styles/containers.js +++ b/styles/containers.js @@ -6,12 +6,6 @@ export default { flex: 1, justifyContent: 'center' }, - greyBorder: { - borderColor: Colors.grey, - borderRadius: 5, - borderStyle: 'solid', - borderWidth: 1, - }, page: { backgroundColor: Colors.tourquiseLight, flex: 1