Skip to content

Commit

Permalink
feat: vulnerability chips - show icon before string (project-zot#392)
Browse files Browse the repository at this point in the history
Signed-off-by: Andreea-Lupu <[email protected]>
  • Loading branch information
Andreea-Lupu authored Nov 28, 2023
1 parent fad5572 commit a288523
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions src/utilities/vulnerabilityAndSignatureComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,7 @@ const NoneVulnerabilityChip = () => {
label="None"
sx={{ backgroundColor: '#E8F5E9', color: '#388E3C', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<OutlinedBugIcon sx={{ color: '#388E3C!important' }} />}
icon={<OutlinedBugIcon sx={{ color: '#388E3C!important' }} />}
data-testid="none-vulnerability-chip"
/>
);
Expand All @@ -162,10 +159,7 @@ const UnknownVulnerabilityChip = () => {
label="Unknown"
sx={{ backgroundColor: '#ECEFF1', color: '#52637A', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<OutlinedBugIcon sx={{ color: '#52637A!important' }} />}
icon={<OutlinedBugIcon sx={{ color: '#52637A!important' }} />}
data-testid="unknown-vulnerability-chip"
/>
);
Expand All @@ -176,10 +170,7 @@ const FailedScanChip = () => {
label="Failed to scan"
sx={{ backgroundColor: '#848484', color: '#F6F7F9', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<SvgIcon component={failedScanBug} sx={{ color: '#F6F7F9!important' }} />}
icon={<SvgIcon component={failedScanBug} sx={{ color: '#F6F7F9!important' }} />}
data-testid="failed-vulnerability-chip"
/>
);
Expand All @@ -190,10 +181,7 @@ const LowVulnerabilityChip = () => {
label="Low"
sx={{ backgroundColor: '#FFF3E0', color: '#FB8C00', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<OutlinedBugIcon sx={{ color: '#FB8C00!important' }} />}
icon={<OutlinedBugIcon sx={{ color: '#FB8C00!important' }} />}
data-testid="low-vulnerability-chip"
/>
);
Expand All @@ -204,10 +192,7 @@ const MediumVulnerabilityChip = () => {
label="Medium"
sx={{ backgroundColor: '#FFF3E0', color: '#FB8C00', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<FilledBugIcon sx={{ color: '#FB8C00!important' }} />}
icon={<FilledBugIcon sx={{ color: '#FB8C00!important' }} />}
data-testid="medium-vulnerability-chip"
/>
);
Expand All @@ -218,10 +203,7 @@ const HighVulnerabilityChip = () => {
label="High"
sx={{ backgroundColor: '#FEEBEE', color: '#E53935', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<OutlinedBugIcon sx={{ color: '#E53935!important' }} />}
icon={<OutlinedBugIcon sx={{ color: '#E53935!important' }} />}
data-testid="high-vulnerability-chip"
/>
);
Expand All @@ -232,10 +214,7 @@ const CriticalVulnerabilityChip = () => {
label="Critical"
sx={{ backgroundColor: '#FEEBEE', color: '#E53935', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
return;
}}
deleteIcon={<FilledBugIcon sx={{ color: '#E53935!important' }} />}
icon={<FilledBugIcon sx={{ color: '#E53935!important' }} />}
data-testid="critical-vulnerability-chip"
/>
);
Expand Down

0 comments on commit a288523

Please sign in to comment.