|
|
@ -48,26 +48,34 @@ function Badge ({ badgeStatus }: BadgeProps) { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
{ |
|
|
|
{badgeStatus && checkStatusKeyValue(badgeStatus.key, badgeStatus.type) ? ( |
|
|
|
badgeStatus && checkStatusKeyValue(badgeStatus.key, badgeStatus.type) ? ( |
|
|
|
<CustomTooltip |
|
|
|
<CustomTooltip |
|
|
|
placement={"right"} |
|
|
|
placement={'right'} |
|
|
|
tooltipClasses="text-nowrap" |
|
|
|
tooltipClasses="text-nowrap" |
|
|
|
tooltipId="verticalItemsbadge" |
|
|
|
tooltipId="verticalItemsbadge" |
|
|
|
tooltipText={badgeStatus.title} |
|
|
|
tooltipText={badgeStatus.title} |
|
|
|
> |
|
|
|
> |
|
|
|
<i |
|
|
|
<i |
|
|
|
className={`${resolveClasses(badgeStatus.key, badgeStatus.type!)}`} |
|
|
|
className={`${resolveClasses(badgeStatus.key, badgeStatus.type!)}`} |
|
|
|
aria-hidden="true" |
|
|
|
aria-hidden="true" |
|
|
|
> |
|
|
|
> |
|
|
|
{badgeStatus.pluginName && |
|
|
|
{ badgeStatus.pluginName && badgeStatus.pluginName === 'solidityStaticAnalysis' ? badgeStatus.type === 'warning' || badgeStatus.type === 'error' ? <span> |
|
|
|
badgeStatus.pluginName === "solidityStaticAnalysis" ? ( |
|
|
|
<i className="far fa-exclamation-triangle"></i></span> |
|
|
|
badgeStatus.type === "warning" || badgeStatus.type === "error" || badgeStatus.type === "danger" ? ( |
|
|
|
: <span> </span> : badgeStatus.text } |
|
|
|
<span> |
|
|
|
</i> |
|
|
|
<i className="far fa-exclamation-triangle"></i> |
|
|
|
</CustomTooltip>) : null |
|
|
|
</span> |
|
|
|
} |
|
|
|
) : ( |
|
|
|
|
|
|
|
<span> </span> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
badgeStatus.text |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</i> |
|
|
|
|
|
|
|
</CustomTooltip> |
|
|
|
|
|
|
|
) : null} |
|
|
|
</> |
|
|
|
</> |
|
|
|
) |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default Badge |
|
|
|
export default Badge |
|
|
|