-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkout: Add thank you page for the domain only site flow #11702
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c402787
Checkout: Add thank you page for the domain only site flow
gziolo 0054e12
Components: Extract ThankYouCard component
gziolo a4373f6
Checkout: Check the `purchases` and `failedPurchases` length as empty…
drewblaisdell 42c369f
Checkout: Move `PlanThankYouCard` styles to `ThankYouCard`
drewblaisdell f4f2962
Checkout: Display `ThankYouCard` for domain-only purchases
drewblaisdell a46bbfb
Checkout: Hide `ThankYouCard` if a receipt ID (and thus purchases) ar…
drewblaisdell 1de5e4c
Checkout: Add copy changes to the Thank You page for the domain only …
gziolo 52cd24b
Checkout: Provide raw `receipt` object to `fetchReceiptCompleted` action
drewblaisdell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import classnames from 'classnames'; | ||
import Gridicon from 'gridicons'; | ||
import React, { PropTypes } from 'react'; | ||
|
||
// Non standard gridicon sizes are used here because we use them as background pattern with various sizes and rotation | ||
/* eslint-disable wpcalypso/jsx-gridicon-size */ | ||
const ThankYouCard = ( { heading, description, buttonUrl, buttonText, price, name } ) => ( | ||
<div className="thank-you-card"> | ||
<div className="thank-you-card__header"> | ||
<Gridicon className="thank-you-card__main-icon" icon="checkmark-circle" size={ 140 } /> | ||
|
||
<div> | ||
<div className={ classnames( 'thank-you-card__name', { 'is-placeholder': ! name } ) }> | ||
{ name } | ||
</div> | ||
<div className={ classnames( 'thank-you-card__price', { 'is-placeholder': ! price } ) }> | ||
{ price } | ||
</div> | ||
</div> | ||
|
||
<div className="thank-you-card__background-icons"> | ||
<Gridicon icon="audio" size={ 52 } /> | ||
<Gridicon icon="audio" size={ 20 } /> | ||
<Gridicon icon="heart" size={ 52 } /> | ||
<Gridicon icon="heart" size={ 41 } /> | ||
<Gridicon icon="star" size={ 26 } /> | ||
<Gridicon icon="status" size={ 52 } /> | ||
<Gridicon icon="audio" size={ 38 } /> | ||
<Gridicon icon="status" size={ 28 } /> | ||
<Gridicon icon="status" size={ 65 } /> | ||
<Gridicon icon="star" size={ 57 } /> | ||
<Gridicon icon="star" size={ 33 } /> | ||
<Gridicon icon="star" size={ 45 } /> | ||
</div> | ||
</div> | ||
<div className="thank-you-card__body"> | ||
<div className="thank-you-card__heading"> | ||
{ heading } | ||
</div> | ||
<div className="thank-you-card__description"> | ||
{ description } | ||
</div> | ||
<a | ||
className={ classnames( 'thank-you-card__button', { 'is-placeholder': ! buttonUrl } ) } | ||
href={ buttonUrl }> | ||
{ buttonText } | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
/* eslint-enable wpcalypso/jsx-gridicon-size */ | ||
|
||
ThankYouCard.propTypes = { | ||
buttonText: PropTypes.string, | ||
buttonUrl: PropTypes.string, | ||
description: PropTypes.string, | ||
heading: PropTypes.string, | ||
name: PropTypes.string, | ||
price: PropTypes.string, | ||
}; | ||
|
||
export default ThankYouCard; |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.