aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/create/project
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2024-07-22 11:37:38 +0200
committersonartech <sonartech@sonarsource.com>2024-07-24 20:02:49 +0000
commit04de2de3d71fceab34404f5bb047671658dd1bb9 (patch)
tree0e2cb02442a587e32cb58811c52fdaebea6cee96 /server/sonar-web/src/main/js/apps/create/project
parentb0789ab729b158223d633fd3ebfb34bf7c5ab516 (diff)
downloadsonarqube-04de2de3d71fceab34404f5bb047671658dd1bb9.tar.gz
sonarqube-04de2de3d71fceab34404f5bb047671658dd1bb9.zip
SONAR-22523 Replace old Buttons with Echoes Buttons
Diffstat (limited to 'server/sonar-web/src/main/js/apps/create/project')
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx12
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx17
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx7
3 files changed, 23 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx b/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx
index 02eb7f64b7b..acc72882975 100644
--- a/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx
@@ -19,8 +19,8 @@
*/
import styled from '@emotion/styled';
-import { Checkbox } from '@sonarsource/echoes-react';
-import { ButtonPrimary, InputSearch, LightPrimary, themeBorder, themeColor } from 'design-system';
+import { Button, ButtonVariety, Checkbox } from '@sonarsource/echoes-react';
+import { InputSearch, LightPrimary, themeBorder, themeColor } from 'design-system';
import React, { useCallback, useMemo } from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import ListFooter from '../../../../components/controls/ListFooter';
@@ -157,9 +157,13 @@ export default function RepositoryList(props: Readonly<RepositoryListProps>) {
/>
</SetupBoxContent>
<div className="sw-mt-4">
- <ButtonPrimary onClick={onImport} className="js-set-up-projects">
+ <Button
+ onClick={onImport}
+ className="js-set-up-projects"
+ variety={ButtonVariety.Primary}
+ >
{formatMessage({ id: 'onboarding.create_project.import' })}
- </ButtonPrimary>
+ </Button>
</div>
</div>
</SetupBox>
diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx
index c766eca3c50..a8771bfaa58 100644
--- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx
@@ -17,8 +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 { Spinner } from '@sonarsource/echoes-react';
-import { BlueGreySeparator, ButtonPrimary, ButtonSecondary } from 'design-system';
+import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react';
+import { BlueGreySeparator } from 'design-system';
import React, { useEffect, useRef } from 'react';
import { FormattedMessage } from 'react-intl';
import { GroupBase } from 'react-select';
@@ -250,12 +250,17 @@ export default function MonorepoProjectCreate(props: Readonly<MonorepoProjectCre
)}
<div className="sw-my-5">
- <ButtonSecondary onClick={cancelMonorepoSetup}>
+ <Button onClick={cancelMonorepoSetup}>
<FormattedMessage id="cancel" />
- </ButtonSecondary>
- <ButtonPrimary className="sw-ml-3" disabled={isSetupInvalid} onClick={submitProjects}>
+ </Button>
+ <Button
+ className="sw-ml-3"
+ isDisabled={isSetupInvalid}
+ onClick={submitProjects}
+ variety={ButtonVariety.Primary}
+ >
<FormattedMessage id="next" />
- </ButtonPrimary>
+ </Button>
</div>
</div>
);
diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx
index d66d5585f7e..32692270ed5 100644
--- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx
@@ -17,7 +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 { ButtonSecondary, SubTitle } from 'design-system';
+import { Button } from '@sonarsource/echoes-react';
+import { SubTitle } from 'design-system';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { ProjectData, ProjectValidationCard } from '../components/ProjectValidation';
@@ -60,9 +61,9 @@ export function MonorepoProjectsList({
</div>
<div className="sw-flex sw-justify-end sw-mt-4">
- <ButtonSecondary onClick={onAddProject}>
+ <Button onClick={onAddProject}>
<FormattedMessage id="onboarding.create_project.monorepo.add_project" />
- </ButtonSecondary>
+ </Button>
</div>
</div>
);