display icons depending on the state of the process

This commit is contained in:
Iuri Matias 2018-09-04 16:50:10 -04:00 committed by Pascal Precht
parent 7a4f1180cf
commit 1e721fa4f6
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 8 additions and 1 deletions

View File

@ -11,12 +11,19 @@ function stampClasses(state){
});
}
function iconClasses(state){
return classNames('fe', {
'fe-check-square': state === 'running',
'fe-x': state !== 'running'
});
}
const Process = ({process}) => (
<Grid.Col sm={6} lg={3}>
<Card className="p-3">
<div className="d-flex align-items-center">
<span className={stampClasses(process.state)}>
<i className="fe fa-cube"></i>
<i className={iconClasses(process.state)}></i>
</span>
<div>
<h4 className="text-capitalize m-0"><Link to={`/embark/processes/${process.name}`}>{process.name}</Link></h4>