Files
deighton-ar/mobile/src/ui/FormStaticInput.js
2018-05-28 16:12:20 -07:00

46 lines
1.0 KiB
JavaScript

import React from "react"
import PropTypes from "prop-types"
import { TextInput, Text, View, Platform } from "react-native"
export class FormStaticInput extends React.Component {
static propTypes = {
label: PropTypes.string,
value: PropTypes.string,
}
render() {
const { label, value } = this.props
return (
<View style={{ width: "100%" }}>
<Text
style={{
color: "black",
fontSize: 14,
marginBottom: 5,
}}>
{label}
</Text>
<TextInput
style={{
width: "100%",
paddingLeft: 5,
paddingRight: 5,
borderColor: "gray",
borderWidth: 1,
fontSize: 16,
paddingTop: 7,
paddingBottom: Platform.OS === "ios" ? 7 : 0,
textAlignVertical: "top",
marginBottom: 5,
}}
editable={false}
autoCapitalize="none"
underlineColorAndroid="white"
value={value}
/>
</View>
)
}
}