From a288523a3ff91d590be6155d8c3d7edf70487d59 Mon Sep 17 00:00:00 2001 From: Andreea Lupu <58118008+Andreea-Lupu@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:51:23 +0200 Subject: [PATCH] feat: vulnerability chips - show icon before string (#392) Signed-off-by: Andreea-Lupu --- .../vulnerabilityAndSignatureComponents.jsx | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/src/utilities/vulnerabilityAndSignatureComponents.jsx b/src/utilities/vulnerabilityAndSignatureComponents.jsx index 370d608f..76e55177 100644 --- a/src/utilities/vulnerabilityAndSignatureComponents.jsx +++ b/src/utilities/vulnerabilityAndSignatureComponents.jsx @@ -148,10 +148,7 @@ const NoneVulnerabilityChip = () => { label="None" sx={{ backgroundColor: '#E8F5E9', color: '#388E3C', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="none-vulnerability-chip" /> ); @@ -162,10 +159,7 @@ const UnknownVulnerabilityChip = () => { label="Unknown" sx={{ backgroundColor: '#ECEFF1', color: '#52637A', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="unknown-vulnerability-chip" /> ); @@ -176,10 +170,7 @@ const FailedScanChip = () => { label="Failed to scan" sx={{ backgroundColor: '#848484', color: '#F6F7F9', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="failed-vulnerability-chip" /> ); @@ -190,10 +181,7 @@ const LowVulnerabilityChip = () => { label="Low" sx={{ backgroundColor: '#FFF3E0', color: '#FB8C00', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="low-vulnerability-chip" /> ); @@ -204,10 +192,7 @@ const MediumVulnerabilityChip = () => { label="Medium" sx={{ backgroundColor: '#FFF3E0', color: '#FB8C00', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="medium-vulnerability-chip" /> ); @@ -218,10 +203,7 @@ const HighVulnerabilityChip = () => { label="High" sx={{ backgroundColor: '#FEEBEE', color: '#E53935', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="high-vulnerability-chip" /> ); @@ -232,10 +214,7 @@ const CriticalVulnerabilityChip = () => { label="Critical" sx={{ backgroundColor: '#FEEBEE', color: '#E53935', fontSize: '0.8125rem' }} variant="filled" - onDelete={() => { - return; - }} - deleteIcon={} + icon={} data-testid="critical-vulnerability-chip" /> );