fix badge centering

pull/5370/head
Joseph Izang 1 year ago
parent 78e1a8e0f6
commit 24ede5779f
  1. 10
      libs/remix-ui/static-analyser/src/lib/components/BasicTitle.tsx
  2. 10
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -42,21 +42,21 @@ export function BasicTitle(props: BasicTitleProps) {
{props.warningStateEntries.length > 0 ? (
!props.hideWarnings ? (
!props.showLibsWarnings ? (
<i
<span
data-id="StaticAnalysisErrorCount"
className={`badge ${
calculateWarningStateEntries(props.warningStateEntries).length >
0
? "badge-warning"
: "badge-danger"
} rounded-circle ml-1 text-center`}
} badge-pill ml-1 px-1 text-center`}
>
{calculateWarningStateEntries(props.warningStateEntries).length}
</i>
</span>
) : (
<i className="badge badge-warning rounded-circle ml-1 text-center">
<span className="badge badge-warning rounded-circle ml-1 text-center">
{warningCount}
</i>
</span>
)
) : null
) : null}

@ -505,12 +505,12 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
{hints.length > 0 ? (
hideWarnings ? (
<i className={`badge ${hints.filter(x => x.type === 'error').length > 0
? `badge-danger` : 'badge-warning'} rounded-circle ml-1 text-center`}>
? `badge-danger` : 'badge-warning'} badge-pill px-1 ml-1 text-center`}>
{hintErrors.length}
</i>
) : (
<i className={`badge ${hints.filter(x => x.type === 'error').length > 0
? `badge-danger` : 'badge-warning'} rounded-circle ml-1 text-center`}>
? `badge-danger` : 'badge-warning'} badge-pill px-1 ml-1 text-center`}>
{hints.length}
</i>
)
@ -545,15 +545,15 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
Slither
{slitherWarnings.length > 0 ? (
hideWarnings ? (
<i className="badge badge-warning rounded-circle ml-1">
<i className="badge badge-warning badge-pill px-1 ml-1">
{slitherErrors.length}
</i>
) : showLibsWarning === true && hideWarnings === false ? (
<i className={`badge ${slitherErrors.length > 0 ? `badge-danger` : 'badge-warning'} rounded-circle ml-1 text-center`}>
<i className={`badge ${slitherErrors.length > 0 ? `badge-danger` : 'badge-warning'} badge-pill px-1 ml-1 text-center`}>
{slitherWarnings.length}
</i>
) : (
<i className={`badge ${slitherErrors.length > 0 ? `badge-danger` : 'badge-warning'} rounded-circle ml-1 text-center`}>
<i className={`badge ${slitherErrors.length > 0 ? `badge-danger` : 'badge-warning'} badge-pill px-1 ml-1 text-center`}>
{noLibSlitherWarnings.length}
</i>
)

Loading…
Cancel
Save