You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
740 B
31 lines
740 B
import React, { Component } from 'react';
|
|
import sharedStyles from '../shared-styles';
|
|
import {
|
|
Platform,
|
|
StyleSheet,
|
|
Text,
|
|
View
|
|
} from 'react-native';
|
|
|
|
export default class RunInfo extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = { value: this.props.value};
|
|
}
|
|
|
|
formatValue() {
|
|
return this.state.value;
|
|
}
|
|
|
|
render() {
|
|
let value = this.state.value ? this.formatValue() : '-';
|
|
return (
|
|
<View style ={[sharedStyles.runInfoWrapper, {flex: 1}]}>
|
|
<Text style ={sharedStyles.runInfoValue}>{value}</Text>
|
|
<Text style={sharedStyles.runInfoTitle}>{this.props.title}</Text>
|
|
|
|
</View>
|
|
)
|
|
}
|
|
}
|