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