Add picker title to labels
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Platform } from 'react-native'
|
||||
import DateTimePicker from 'react-native-modal-datetime-picker'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import AppSwitch from '../../common/app-switch'
|
||||
|
||||
@@ -11,8 +12,9 @@ import {
|
||||
import padWithZeros from '../../helpers/pad-time-with-zeros'
|
||||
|
||||
import labels from '../../../i18n/en/settings'
|
||||
import { withTranslation } from 'react-i18next'
|
||||
|
||||
export default class TemperatureReminder extends Component {
|
||||
class TemperatureReminder extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
@@ -46,6 +48,7 @@ export default class TemperatureReminder extends Component {
|
||||
|
||||
render() {
|
||||
const { isEnabled, isTimePickerVisible, time } = this.state
|
||||
const { t } = this.props
|
||||
|
||||
const tempReminderText =
|
||||
time && isEnabled
|
||||
@@ -65,9 +68,14 @@ export default class TemperatureReminder extends Component {
|
||||
onConfirm={this.onPickDate}
|
||||
onCancel={this.onPickDateCancel}
|
||||
display={Platform.OS === 'ios' ? 'spinner' : 'default'}
|
||||
headerTextIOS="Pick a time"
|
||||
headerTextIOS={t('labels.shared.dateTimePickerTitle')}
|
||||
/>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
TemperatureReminder.propTypes = {
|
||||
t: PropTypes.func.isRequired,
|
||||
}
|
||||
export default withTranslation()(TemperatureReminder)
|
||||
|
||||
Reference in New Issue
Block a user