Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
feat(ui): make JobStatusChip transparent when there are no jobs in it
Browse files Browse the repository at this point in the history
  • Loading branch information
phips28 authored and s-r-x committed Aug 26, 2021
1 parent 2e243ab commit 5ef1388
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/ui/src/components/JobStatusChip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ type TProps = {

export default function JobStatusChip(props: TProps) {
const backgroundColor = useJobStatusColor(props.status);
const style = {
color: '#fff',
backgroundColor,
};
if (isUndefined(props.label) || props.label <= 0) {
style.opacity = 0.5;
}
return (
<Chip
style={{
color: '#fff',
backgroundColor,
}}
style={style}
size={props.size}
className={props.className}
label={isUndefined(props.label) ? props.status : props.label}
Expand Down

0 comments on commit 5ef1388

Please sign in to comment.