diff options
author | Jeremy Davis <jeremy.davis@sonarsource.com> | 2024-09-18 16:24:54 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-09-24 20:03:04 +0000 |
commit | da560b01c75b86e166c5e5d1c08b11372cb386b7 (patch) | |
tree | 2b147b2ac1c4a4513b7e4318836e37c6265a4b37 /server | |
parent | ccbdf257df3f9406d38e3b16f66ec764dd0f7603 (diff) | |
download | sonarqube-da560b01c75b86e166c5e5d1c08b11372cb386b7.tar.gz sonarqube-da560b01c75b86e166c5e5d1c08b11372cb386b7.zip |
SONAR-23030 Use the new Display component
Diffstat (limited to 'server')
3 files changed, 5 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx index 82dd9f0f985..518ae206260 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx @@ -227,7 +227,7 @@ export default function BranchOverviewRenderer(props: BranchOverviewRendererProp data-testid="overview__quality-gate-panel" className="sw-flex sw-justify-between sw-items-start sw-my-6" > - <QGStatus status={qgStatus} titleSize="extra-large" /> + <QGStatus status={qgStatus} /> <LastAnalysisLabel analysisDate={branch?.analysisDate} /> </div> <AnalysisStatus component={component} /> diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx index 60cb87a9c27..0420b284b9a 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { Display } from '@sonarsource/echoes-react'; import { Note, QualityGateIndicator } from 'design-system'; import React from 'react'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; @@ -26,11 +27,10 @@ import { Status } from '../../../sonar-aligned/types/common'; interface Props { status?: Status; - titleSize?: 'large' | 'extra-large'; } export default function QualityGateStatus(props: Readonly<Props>) { - const { status = 'NONE', titleSize = 'large' } = props; + const { status = 'NONE' } = props; return ( <div className="sw-flex sw-gap-3" data-spotlight-id="cayc-promotion-3"> @@ -43,9 +43,7 @@ export default function QualityGateStatus(props: Readonly<Props>) { overlay={<div>{translate('overview.quality_gate.help')}</div>} /> </div> - <span className={titleSize === 'large' ? 'sw-heading-lg' : 'sw-heading-xl'}> - {translate('metric.level', status === 'NONE' ? 'NOT_COMPUTED' : status)} - </span> + <Display>{translate('metric.level', status === 'NONE' ? 'NOT_COMPUTED' : status)}</Display> </div> </div> ); diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx index 6358fa67dd9..f83f694ba7b 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx @@ -100,7 +100,7 @@ export default function PullRequestOverview(props: Readonly<Readonly<Props>>) { {ignoredConditions && <IgnoredConditionWarning />} <div className="sw-flex sw-justify-between sw-items-start sw-my-6"> - <QGStatus status={status} titleSize="extra-large" /> + <QGStatus status={status} /> <LastAnalysisLabel analysisDate={pullRequest.analysisDate} /> </div> |