Styles the buttons in password confirmation
This commit is contained in:
@@ -64,7 +64,6 @@ export default class ConfirmWithPassword extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const { password } = this.state
|
||||
const labels = settings.passwordSettings
|
||||
|
||||
@@ -75,17 +74,27 @@ export default class ConfirmWithPassword extends Component {
|
||||
value={password}
|
||||
onChangeText={this.handlePasswordInput}
|
||||
/>
|
||||
<SettingsButton
|
||||
onPress={this.initPasswordCheck}
|
||||
disabled={!password}
|
||||
>
|
||||
{shared.confirmToProceed}
|
||||
</SettingsButton>
|
||||
<SettingsButton
|
||||
onPress={this.props.onCancel}
|
||||
>
|
||||
{shared.cancel}
|
||||
</SettingsButton>
|
||||
<View style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between'
|
||||
}}>
|
||||
<SettingsButton
|
||||
onPress={this.props.onCancel}
|
||||
secondary
|
||||
>
|
||||
{shared.cancel}
|
||||
</SettingsButton>
|
||||
<SettingsButton
|
||||
onPress={this.initPasswordCheck}
|
||||
disabled={!password}
|
||||
style={{
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
{shared.confirmToProceed}
|
||||
</SettingsButton>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
|
||||
@@ -5,16 +5,22 @@ import { TouchableOpacity } from 'react-native'
|
||||
import AppText from '../../app-text'
|
||||
import styles from '../../../styles'
|
||||
|
||||
const SettingsButton = ({ children, ...props }) => {
|
||||
const SettingsButton = ({ children, style, secondary, ...props }) => {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
style={[
|
||||
styles.settingsButton,
|
||||
props.disabled ? styles.settingsButtonDisabled : null
|
||||
secondary ? null : styles.settingsButtonAccent,
|
||||
props.disabled ? styles.settingsButtonDisabled : null,
|
||||
style
|
||||
]}
|
||||
{ ...props }
|
||||
>
|
||||
<AppText style={styles.settingsButtonText}>
|
||||
<AppText style={
|
||||
secondary ?
|
||||
styles.settingsButtonSecondaryText :
|
||||
styles.settingsButtonText
|
||||
}>
|
||||
{children}
|
||||
</AppText>
|
||||
</TouchableOpacity>
|
||||
|
||||
Reference in New Issue
Block a user