-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9ff2e2
commit fb74dde
Showing
7 changed files
with
139 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
...PlanPage/subRoutes/CurrentOrgPlan/InfoMessageStripeCallback/InfoMessageStripeCallback.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpgradeFormModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import A from 'ui/A' | ||
import Button from 'ui/Button' | ||
import Icon from 'ui/Icon' | ||
import Modal from 'ui/Modal' | ||
|
||
interface UpgradeModalProps { | ||
isOpen: boolean | ||
onClose: () => void | ||
onConfirm: () => void | ||
url: string | ||
isUpgrading?: boolean | ||
} | ||
|
||
const UpgradeFormModal = ({ | ||
isOpen, | ||
onClose, | ||
onConfirm, | ||
url, | ||
isUpgrading = false, | ||
}: UpgradeModalProps) => ( | ||
<Modal | ||
isOpen={isOpen} | ||
onClose={onClose} | ||
title={ | ||
<p className="flex items-center gap-2 text-base"> | ||
<Icon | ||
name="exclamationTriangle" | ||
size="sm" | ||
className="fill-ds-primary-yellow" | ||
/> | ||
Incomplete Plan Upgrade | ||
</p> | ||
} | ||
body={ | ||
<div className="flex flex-col gap-4"> | ||
<div> | ||
You have an incomplete plan upgrade that is awaiting payment | ||
verification{' '} | ||
<A | ||
href={url} | ||
isExternal | ||
hook={'verify-payment-method'} | ||
to={undefined} | ||
> | ||
here | ||
</A> | ||
. | ||
</div> | ||
<p> | ||
Are you sure you wish to abandon the pending upgrade and start a new | ||
one? | ||
</p> | ||
</div> | ||
} | ||
footer={ | ||
<div className="flex gap-2"> | ||
<Button hook="cancel-upgrade" onClick={onClose} disabled={isUpgrading}> | ||
Cancel | ||
</Button> | ||
<Button | ||
hook="confirm-upgrade" | ||
variant="primary" | ||
onClick={onConfirm} | ||
disabled={isUpgrading} | ||
> | ||
{isUpgrading ? 'Processing...' : 'Yes, Start New Upgrade'} | ||
</Button> | ||
</div> | ||
} | ||
/> | ||
) | ||
|
||
export default UpgradeFormModal |