diff options
author | David Cho-Lerat <david.cho-lerat@sonarsource.com> | 2024-07-19 12:30:32 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-07-24 20:02:49 +0000 |
commit | b0789ab729b158223d633fd3ebfb34bf7c5ab516 (patch) | |
tree | a830d37ab007bdaef01ee97aa081b350abd51eda /server/sonar-web/src/main | |
parent | d4a70437e83e0c035dda827edd2bcfa7081f0aac (diff) | |
download | sonarqube-b0789ab729b158223d633fd3ebfb34bf7c5ab516.tar.gz sonarqube-b0789ab729b158223d633fd3ebfb34bf7c5ab516.zip |
SONAR-22522 Use ButtonGroup from Echoes
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx index 7320eb30c82..266fdf17d95 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { ButtonGroup } from '@sonarsource/echoes-react'; import { InputSearch, LightLabel, LightPrimary } from 'design-system'; import * as React from 'react'; import { RawQuery } from '~sonar-aligned/types/router'; @@ -42,7 +44,7 @@ interface Props { const MIN_SEARCH_QUERY_LENGTH = 2; -export default function PageHeader(props: Props) { +export default function PageHeader(props: Readonly<Props>) { const { query, total, currentUser, view } = props; const defaultOption = isLoggedIn(currentUser) ? 'name' : 'analysis_date'; @@ -53,9 +55,13 @@ export default function PageHeader(props: Props) { return ( <div className="it__page-header sw-flex sw-flex-col"> <div className="sw-flex sw-justify-end sw-mb-4"> - <ProjectCreationMenu /> - <ApplicationCreation className="sw-ml-2" /> + <ButtonGroup> + <ProjectCreationMenu /> + + <ApplicationCreation /> + </ButtonGroup> </div> + <div className="sw-flex sw-justify-between"> <div className="sw-flex sw-flex-1"> <Tooltip content={translate('projects.search')}> @@ -69,7 +75,9 @@ export default function PageHeader(props: Props) { searchInputAriaLabel={translate('search_verb')} /> </Tooltip> + <PerspectiveSelect onChange={props.onPerspectiveChange} view={view} /> + <ProjectsSortingSelect defaultOption={defaultOption} onChange={props.onSortChange} @@ -77,15 +85,18 @@ export default function PageHeader(props: Props) { view={view} /> </div> + <div className="sw-flex sw-items-center"> {total != null && ( <> <LightPrimary id="projects-total" className="sw-body-sm-highlight sw-mr-1"> {total} </LightPrimary> + <LightLabel className="sw-body-sm">{translate('projects_')}</LightLabel> </> )} + <HomePageSelect currentPage={{ type: 'PROJECTS' }} /> </div> </div> |