-
Notifications
You must be signed in to change notification settings - Fork 53
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
Feature/style express piwoo 560 #961
base: develop
Are you sure you want to change the base?
Conversation
added css for the button added in cart and checkout block
This PR adds the new settings UI
This PR adds Apple express button
# Conflicts: # inc/settings/mollie_applepay_settings.php
Removed the css styles. Hardcoded defaults. New component for the editor. Use the new component in cart and checkout.
@@ -11,6 +11,11 @@ export const ApplePayButtonComponent = ({cart, extensions}) => { | |||
shop: {countryCode, currencyCode = 'EUR', totalLabel = ''}, | |||
ajaxUrl, | |||
} = mollieApplePayBlockDataCart | |||
const { useMemo } = wp.element; |
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.
Try to import from @wordpress/element
rather than from the global variable.
@@ -0,0 +1,17 @@ | |||
export const ApplePayButtonEditorComponent = ({ buttonAttributes = {} }) => { | |||
const { useMemo } = wp.element; |
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.
Try to import from @wordpress/element
rather than from the global variable.
@@ -11,6 +11,11 @@ export const ApplePayButtonComponent = ({cart, extensions}) => { | |||
shop: {countryCode, currencyCode = 'EUR', totalLabel = ''}, | |||
ajaxUrl, | |||
} = mollieApplePayBlockDataCart | |||
const { useMemo } = wp.element; | |||
const style = useMemo(() => ({ |
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.
I am not a React expert, but I think useMemo
should be used for very expensive actions. If you decide to remove it, you can ignore my comments about importing useMemo from @wordpress/element
@@ -0,0 +1,17 @@ | |||
export const ApplePayButtonEditorComponent = ({ buttonAttributes = {} }) => { | |||
const { useMemo } = wp.element; | |||
const style = useMemo(() => ({ |
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.
The same applies here. I don't think useMemo
is needed.
Fix phpcs before merging :) |
This PR is based in release 7.9.0-beta
Handles PIWOO-560