-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NO-CHANGELOG] feat: primary revenue widget setup - part 1 (#896)
- Loading branch information
Showing
15 changed files
with
737 additions
and
13 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
38 changes: 38 additions & 0 deletions
38
packages/checkout/widgets-lib/src/context/view-context/PrimaryRevenueViewContextTypes.ts
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,38 @@ | ||
import { ViewType } from './ViewType'; | ||
|
||
export enum PrimaryRevenueWidgetViews { | ||
PAYMENT_METHODS = 'PAYMENT_METHODS', | ||
PAY_WITH_COINS = 'PAY_WITH_COINS', | ||
PAY_WITH_CARD = 'PAY_WITH_CARD', | ||
FUND_WITH_SMART_CHECKOUT = 'FUND_WITH_SMART_CHECKOUT', | ||
SUCCESS = 'SUCCESS', | ||
FAIL = 'FAIL', | ||
} | ||
|
||
export type PrimaryRevenueWidgetView = | ||
| PrimaryRevenueMethodsView | ||
| PrimaryRevenueWithCoinsView | ||
| PrimaryRevenueWithCardView | ||
| PrimaryRevenueSmartCheckoutView | ||
| PrimaryRevenueSuccessView | ||
| PrimaryRevenueFailView; | ||
|
||
interface PrimaryRevenueMethodsView extends ViewType { | ||
type: PrimaryRevenueWidgetViews.PAYMENT_METHODS; | ||
} | ||
interface PrimaryRevenueWithCoinsView extends ViewType { | ||
type: PrimaryRevenueWidgetViews.PAY_WITH_COINS; | ||
} | ||
interface PrimaryRevenueWithCardView extends ViewType { | ||
type: PrimaryRevenueWidgetViews.PAY_WITH_CARD; | ||
} | ||
interface PrimaryRevenueSmartCheckoutView extends ViewType { | ||
type: PrimaryRevenueWidgetViews.FUND_WITH_SMART_CHECKOUT; | ||
} | ||
interface PrimaryRevenueSuccessView extends ViewType { | ||
type: PrimaryRevenueWidgetViews.SUCCESS; | ||
} | ||
interface PrimaryRevenueFailView extends ViewType { | ||
type: PrimaryRevenueWidgetViews.FAIL; | ||
reason?: string; | ||
} |
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
Oops, something went wrong.