Change icon color is machines available

This commit is contained in:
Arnaud Vergnet 2020-04-12 20:51:38 +02:00
parent 3d631cc816
commit 7128a68641

View file

@ -29,11 +29,14 @@ class ProxiwashListItem extends React.Component<Props> {
(props.nbAvailable <= 1)
? i18n.t('proxiwashScreen.numAvailable')
: i18n.t('proxiwashScreen.numAvailablePlural'));
const iconColor = props.nbAvailable > 0
? this.props.theme.colors.success
: this.props.theme.colors.primary;
return (
<View style={styles.container}>
<Avatar.Icon
icon={props.isDryer ? 'tumble-dryer' : 'washing-machine'}
color={this.props.theme.colors.primary}
color={iconColor}
style={styles.icon}
/>
<View style={{justifyContent: 'center'}}>