Browse Source

Change icon color is machines available

Arnaud Vergnet 4 years ago
parent
commit
7128a68641
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/components/Lists/ProxiwashSectionHeader.js

+ 4
- 1
src/components/Lists/ProxiwashSectionHeader.js View File

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

Loading…
Cancel
Save