-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alec Chen <[email protected]> Co-authored-by: Paul Cramer <[email protected]>
- Loading branch information
1 parent
d93de53
commit 49c9fde
Showing
7 changed files
with
292 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
title: Pay components & utilities Types | ||
description: Glossary of Types in Pay components & utilities. | ||
--- | ||
|
||
# Types [Glossary of Types in Pay components & utilities.] | ||
|
||
|
||
## `LifecycleStatus` | ||
|
||
```ts | ||
type LifecycleStatus = | ||
| { | ||
statusName: 'init'; | ||
statusData: LifecycleStatusDataShared; | ||
} | ||
| { | ||
statusName: 'error'; | ||
statusData: TransactionError; | ||
} | ||
| { | ||
statusName: 'paymentPending'; | ||
statusData: LifecycleStatusDataShared; | ||
} | ||
| { | ||
statusName: 'success'; // if the last mutation attempt was successful | ||
statusData: { | ||
transactionReceipts: TransactionReceipt[]; | ||
chargeId: string; | ||
receiptUrl: string; | ||
}; | ||
}; | ||
``` | ||
|
||
## `PayButtonReact` | ||
|
||
```ts | ||
type PayButtonReact = { | ||
className?: string; | ||
coinbaseBranded?: boolean; | ||
disabled?: boolean; | ||
icon?: React.ReactNode; | ||
text?: string; | ||
}; | ||
``` | ||
|
||
## `PayReact` | ||
|
||
```ts | ||
type PayReact = { | ||
chargeHandler?: () => Promise<string>; | ||
children: React.ReactNode; | ||
className?: string; | ||
onStatus?: (status: LifecycleStatus) => void; | ||
productId?: string; | ||
}; | ||
``` | ||
|
||
## `PayStatusReact` | ||
|
||
```ts | ||
type PayStatusReact = { className?: string }; | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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