Skip to content

Commit 523682f

Browse files
Add disableInstallButton property to InstallScreen component
1 parent 5ed47de commit 523682f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/young-sides-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"bigcommerce-design-patterns": patch
3+
---
4+
5+
Added disableInstallButton property to InstallScreen component

packages/patterns/src/components/InstallScreen/InstallScreen.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export interface AppType {
105105
interface InstallScreenProps {
106106
backgroundSrc?: string;
107107
isLoading?: boolean;
108+
disableInstallButton?: boolean;
108109
showBackButton?: boolean;
109110
onBackButtonClick?: (event: React.MouseEvent) => void;
110111
onInstallButtonClick?: (event: React.MouseEvent) => void;
@@ -210,6 +211,7 @@ export const InstallScreen: FunctionComponent<InstallScreenProps> = ({
210211
backgroundSrc,
211212
isLoading,
212213
showBackButton = true,
214+
disableInstallButton = false,
213215
onBackButtonClick,
214216
onInstallButtonClick,
215217
customForm,
@@ -452,7 +454,7 @@ export const InstallScreen: FunctionComponent<InstallScreenProps> = ({
452454
marginBottom={{ mobile: "none", desktop: "medium" }}
453455
onClick={onInstallButtonClick}
454456
isLoading={isLoading}
455-
disabled={app.requireAcknowledgment && !acknowledged}
457+
disabled={disableInstallButton || (app.requireAcknowledgment && !acknowledged)}
456458
>
457459
{copy.install}
458460
</Button>

0 commit comments

Comments
 (0)