Change icon color is machines available
This commit is contained in:
父節點
3d631cc816
當前提交
7128a68641
共有 1 個文件被更改,包括 4 次插入 和 1 次删除
|
@ -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'}}>
|
||||
|
|
載入中…
Reference in a new issue