ensure exclamation icon shows in badge

pull/3838/head
Joseph Izang 1 year ago
parent b97fa0fedf
commit 5ef943316e
  1. 26
      libs/remix-ui/vertical-icons-panel/src/lib/components/Badge.tsx

@ -48,10 +48,9 @@ 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}
@ -60,14 +59,23 @@ function Badge ({ badgeStatus }: BadgeProps) {
className={`${resolveClasses(badgeStatus.key, badgeStatus.type!)}`} className={`${resolveClasses(badgeStatus.key, badgeStatus.type!)}`}
aria-hidden="true" aria-hidden="true"
> >
{ badgeStatus.pluginName && badgeStatus.pluginName === 'solidityStaticAnalysis' ? badgeStatus.type === 'warning' || badgeStatus.type === 'error' ? <span> {badgeStatus.pluginName &&
<i className="far fa-exclamation-triangle"></i></span> badgeStatus.pluginName === "solidityStaticAnalysis" ? (
: <span>&nbsp;</span> : badgeStatus.text } badgeStatus.type === "warning" || badgeStatus.type === "error" || badgeStatus.type === "danger" ? (
<span>
<i className="far fa-exclamation-triangle"></i>
</span>
) : (
<span>&nbsp;</span>
)
) : (
badgeStatus.text
)}
</i> </i>
</CustomTooltip>) : null </CustomTooltip>
} ) : null}
</> </>
) );
} }
export default Badge export default Badge

Loading…
Cancel
Save