-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release/8.9.0' into trunk
- Loading branch information
Showing
60 changed files
with
2,744 additions
and
287 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 was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
client/blocks/express-checkout/express-button-previews/index.js
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,60 @@ | ||
import classNames from 'classnames'; | ||
import googlePayIcon from '../../../payment-method-icons/google-pay/icon-white.svg'; | ||
import applePayIcon from '../../../payment-method-icons/apple-pay/icon-white.svg'; | ||
import stripeLinkIcon from '../../../payment-method-icons/link/icon-black.svg'; | ||
import './style.scss'; | ||
|
||
/** | ||
* Base PaymentButtonPreview Component | ||
* | ||
* @param {Object} props | ||
* @param {string} props.icon - The icon to display. | ||
* @param {string} [props.className] - Optional additional class names. | ||
* @return {JSX.Element} The rendered component. | ||
*/ | ||
const PaymentButtonPreview = ( { icon, className } ) => ( | ||
<div | ||
className={ classNames( | ||
'wc-stripe-payment-button-preview', | ||
className | ||
) } | ||
> | ||
<img src={ icon } alt="Payment Method Icon" /> | ||
</div> | ||
); | ||
|
||
/** | ||
* GooglePayPreview Component | ||
* | ||
* @return {JSX.Element} The rendered component. | ||
*/ | ||
export const GooglePayPreview = () => ( | ||
<PaymentButtonPreview | ||
icon={ googlePayIcon } | ||
className="wc-stripe-google-pay-preview" | ||
/> | ||
); | ||
|
||
/** | ||
* ApplePayPreview Component | ||
* | ||
* @return {JSX.Element} The rendered component. | ||
*/ | ||
export const ApplePayPreview = () => ( | ||
<PaymentButtonPreview | ||
icon={ applePayIcon } | ||
className="wc-stripe-apple-pay-preview" | ||
/> | ||
); | ||
|
||
/** | ||
* StripeLinkPreview Component | ||
* | ||
* @return {JSX.Element} The rendered component. | ||
*/ | ||
export const StripeLinkPreview = () => ( | ||
<PaymentButtonPreview | ||
icon={ stripeLinkIcon } | ||
className="wc-stripe-link-preview" | ||
/> | ||
); |
22 changes: 22 additions & 0 deletions
22
client/blocks/express-checkout/express-button-previews/style.scss
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,22 @@ | ||
.wc-stripe-payment-button-preview { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #000; | ||
border-radius: 5px; | ||
height: 40px; | ||
img { | ||
height: 22px; | ||
} | ||
&:hover { | ||
cursor: pointer; | ||
filter: opacity(0.7); | ||
} | ||
/* Stripe Link Overrides */ | ||
&.wc-stripe-link-preview { | ||
background-color: #00d66f; | ||
img { | ||
height: 40px; | ||
} | ||
} | ||
} |
12 changes: 11 additions & 1 deletion
12
client/blocks/express-checkout/express-checkout-container.js
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.