Fix bugs when adding activity
This commit is contained in:
46
mobile/src/ui/FormStaticInput.js
Normal file
46
mobile/src/ui/FormStaticInput.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { TextInput, Text, View, Platform } from "react-native"
|
||||
import autobind from "autobind-decorator"
|
||||
|
||||
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>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user