From 2ceb43767e06fe928ea72be4b10a787c01fbf2e1 Mon Sep 17 00:00:00 2001 From: Jozef Mrazek Date: Tue, 23 Apr 2024 11:44:48 +0200 Subject: [PATCH] [NCL-8452] Consolidate action buttons --- .../ArtifactEditQualityModalButton.tsx | 11 +++++------ src/components/ArtifactPages/ArtifactPages.tsx | 2 +- src/components/BrewPushModal/BrewPushModalButton.tsx | 2 +- .../BuildArtifactsPage/BuildArtifactsPage.tsx | 1 - .../BuildConfigRestoreModalButton.tsx | 2 +- .../CancelBuildModal/CancelBuildModalButton.tsx | 2 +- .../GroupConfigDetailPage/GroupConfigDetailPage.tsx | 4 +++- .../ProductMilestoneMarkModalButton.tsx | 1 + 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/ArtifactEditQualityModal/ArtifactEditQualityModalButton.tsx b/src/components/ArtifactEditQualityModal/ArtifactEditQualityModalButton.tsx index d391a45b..74cb4619 100644 --- a/src/components/ArtifactEditQualityModal/ArtifactEditQualityModalButton.tsx +++ b/src/components/ArtifactEditQualityModal/ArtifactEditQualityModalButton.tsx @@ -1,19 +1,18 @@ -import { Button } from '@patternfly/react-core'; +import { Button, ButtonProps } from '@patternfly/react-core'; import { ButtonTitles } from 'common/constants'; -import { IArtifactEditQualityModalProps } from 'components/ArtifactEditQualityModal/ArtifactEditQualityModal'; import { ProtectedComponent } from 'components/ProtectedContent/ProtectedComponent'; import { TooltipWrapper } from 'components/TooltipWrapper/TooltipWrapper'; type IArtifactEditQualityModalButtonProps = { toggleModal: () => void; - variant: IArtifactEditQualityModalProps['variant']; + variant?: ButtonProps['variant']; } & ({ isBuildVariant?: false } | { isBuildVariant: true; buildArtifactsCount: number | undefined }); export const ArtifactEditQualityModalButton = ({ toggleModal, - variant, + variant = 'secondary', isBuildVariant, ...props }: IArtifactEditQualityModalButtonProps) => { @@ -24,8 +23,8 @@ export const ArtifactEditQualityModalButton = ({ return ( - diff --git a/src/components/ArtifactPages/ArtifactPages.tsx b/src/components/ArtifactPages/ArtifactPages.tsx index 666493f0..07c9987c 100644 --- a/src/components/ArtifactPages/ArtifactPages.tsx +++ b/src/components/ArtifactPages/ArtifactPages.tsx @@ -93,7 +93,7 @@ export const ArtifactPages = () => { } + actions={} tabs={pageTabs} > diff --git a/src/components/BrewPushModal/BrewPushModalButton.tsx b/src/components/BrewPushModal/BrewPushModalButton.tsx index 0df365dd..cdc77814 100644 --- a/src/components/BrewPushModal/BrewPushModalButton.tsx +++ b/src/components/BrewPushModal/BrewPushModalButton.tsx @@ -16,7 +16,7 @@ export const BrewPushModalButton = ({ toggleModal, build }: IBrewPushModalButton return ( - diff --git a/src/components/BuildArtifactsPage/BuildArtifactsPage.tsx b/src/components/BuildArtifactsPage/BuildArtifactsPage.tsx index 6d1b1d62..3d5bfeb8 100644 --- a/src/components/BuildArtifactsPage/BuildArtifactsPage.tsx +++ b/src/components/BuildArtifactsPage/BuildArtifactsPage.tsx @@ -45,7 +45,6 @@ export const BuildArtifactsPage = ({ componentId = 'a1' }: IBuildArtifactsPagePr diff --git a/src/components/BuildConfigRestoreModal/BuildConfigRestoreModalButton.tsx b/src/components/BuildConfigRestoreModal/BuildConfigRestoreModalButton.tsx index e840cc20..1c2f6b4b 100644 --- a/src/components/BuildConfigRestoreModal/BuildConfigRestoreModalButton.tsx +++ b/src/components/BuildConfigRestoreModal/BuildConfigRestoreModalButton.tsx @@ -8,7 +8,7 @@ interface IBuildConfigRestoreModalButtonProps { export const BuildConfigRestoreModalButton = ({ toggleModal }: IBuildConfigRestoreModalButtonProps) => ( - diff --git a/src/components/CancelBuildModal/CancelBuildModalButton.tsx b/src/components/CancelBuildModal/CancelBuildModalButton.tsx index 61ec3e2d..d9a33374 100644 --- a/src/components/CancelBuildModal/CancelBuildModalButton.tsx +++ b/src/components/CancelBuildModal/CancelBuildModalButton.tsx @@ -20,7 +20,7 @@ export const CancelBuildModalButton = ({ toggleModal, build, variant }: ICancelB return ( - diff --git a/src/components/GroupConfigDetailPage/GroupConfigDetailPage.tsx b/src/components/GroupConfigDetailPage/GroupConfigDetailPage.tsx index 44db24a1..091db0a3 100644 --- a/src/components/GroupConfigDetailPage/GroupConfigDetailPage.tsx +++ b/src/components/GroupConfigDetailPage/GroupConfigDetailPage.tsx @@ -126,7 +126,9 @@ export const GroupConfigDetailPage = ({ , - Edit Group Config + + Edit Group Config + , ]} sidebar={{ diff --git a/src/components/ProductMilestoneMarkModal/ProductMilestoneMarkModalButton.tsx b/src/components/ProductMilestoneMarkModal/ProductMilestoneMarkModalButton.tsx index ba33067e..349d8ea6 100644 --- a/src/components/ProductMilestoneMarkModal/ProductMilestoneMarkModalButton.tsx +++ b/src/components/ProductMilestoneMarkModal/ProductMilestoneMarkModalButton.tsx @@ -47,6 +47,7 @@ export const ProductMilestoneMarkModalButton = ({ variant === 'list' && !isDisabled && 'black-color', variant === 'list' && isDisabled && 'disabled-color', variant === 'list' && 'dropdown-item-font-size', + 'dropdown-item-font-size', 'text-align-left' )} isBlock