Introduces AppTextInput and Button components styling update

This commit is contained in:
mashazyu
2020-03-25 16:21:29 +01:00
committed by Sofiya Tepikin
parent c090e14835
commit 842e8a2a24
2 changed files with 21 additions and 33 deletions
+8 -27
View File
@@ -1,42 +1,23 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, TextInput } from 'react-native'
import { Colors } from '../../styles/redesign'
import { Colors, Spacing, Typography } from '../../styles/redesign'
const AppTextInput = ({
autoFocus,
onChangeText,
placeholder,
value,
...props
}) => {
return (
<TextInput
autoFocus={autoFocus}
onChangeText={onChangeText}
placeholder={placeholder}
style={styles.input}
value={value}
{...props}
/>
)
}
AppTextInput.propTypes = {
autoFocus: PropTypes.bool,
onChangeText: PropTypes.func,
placeholder: PropTypes.string,
value: PropTypes.string,
const AppTextInput = ({ ...props }) => {
return <TextInput style={styles.input} {...props} />
}
const styles = StyleSheet.create({
input: {
backgroundColor: 'white',
borderColor: Colors.grey,
borderRadius: 5,
borderStyle: 'solid',
borderWidth: 1,
color: Colors.greyDark,
marginTop: Spacing.base,
paddingHorizontal: Spacing.base,
...Typography.mainText
}
})