forked from vergnet/application-amicale
Change icon color is machines available
This commit is contained in:
parent
3d631cc816
commit
7128a68641
1 changed files with 4 additions and 1 deletions
|
@ -29,11 +29,14 @@ class ProxiwashListItem extends React.Component<Props> {
|
||||||
(props.nbAvailable <= 1)
|
(props.nbAvailable <= 1)
|
||||||
? i18n.t('proxiwashScreen.numAvailable')
|
? i18n.t('proxiwashScreen.numAvailable')
|
||||||
: i18n.t('proxiwashScreen.numAvailablePlural'));
|
: i18n.t('proxiwashScreen.numAvailablePlural'));
|
||||||
|
const iconColor = props.nbAvailable > 0
|
||||||
|
? this.props.theme.colors.success
|
||||||
|
: this.props.theme.colors.primary;
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Avatar.Icon
|
<Avatar.Icon
|
||||||
icon={props.isDryer ? 'tumble-dryer' : 'washing-machine'}
|
icon={props.isDryer ? 'tumble-dryer' : 'washing-machine'}
|
||||||
color={this.props.theme.colors.primary}
|
color={iconColor}
|
||||||
style={styles.icon}
|
style={styles.icon}
|
||||||
/>
|
/>
|
||||||
<View style={{justifyContent: 'center'}}>
|
<View style={{justifyContent: 'center'}}>
|
||||||
|
|
Loading…
Reference in a new issue