Skip to content

Commit

Permalink
Fix alignment issue for the warning icon in settings. (#9711)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettshumaker authored Nov 14, 2024
1 parent 47739ad commit 04878e2
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Update Link logo alignment issue when WooPay is enabled and a specific version of Gutenberg is enabled.
42 changes: 24 additions & 18 deletions client/settings/express-checkout/link-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,33 @@ const LinkExpressCheckoutItem = (): React.ReactElement => {
<div className="express-checkout__row">
<div className="express-checkout__checkbox">
{ isWooPayEnabled ? (
<HoverTooltip
content={ __(
'To enable Link by Stripe, you must first disable WooPay.',
'woocommerce-payments'
) }
>
<div className="loadable-checkbox__icon">
<NoticeOutlineIcon />
<div
className="loadable-checkbox__icon-warning"
data-testid="loadable-checkbox-icon-warning"
>
<VisuallyHidden>
{ __(
'Link by Stripe cannot be enabled at checkout. Click to expand.',
<div className="components-base-control components-checkbox-control">
<div className="components-base-control__field">
<span className="components-checkbox-control__input-container">
<HoverTooltip
content={ __(
'To enable Link by Stripe, you must first disable WooPay.',
'woocommerce-payments'
) }
</VisuallyHidden>
</div>
>
<div className="loadable-checkbox__icon">
<NoticeOutlineIcon />
<div
className="loadable-checkbox__icon-warning"
data-testid="loadable-checkbox-icon-warning"
>
<VisuallyHidden>
{ __(
'Link by Stripe cannot be enabled at checkout. Click to expand.',
'woocommerce-payments'
) }
</VisuallyHidden>
</div>
</div>
</HoverTooltip>
</span>
</div>
</HoverTooltip>
</div>
) : (
<CheckboxControl
label={ __(
Expand Down
2 changes: 1 addition & 1 deletion client/settings/express-checkout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.loadable-checkbox__icon .gridicons-notice-outline {
fill: #f0b849;
margin-bottom: -5px;
margin-right: 12px;
margin-left: -4px;
}

&__label-container {
Expand Down
42 changes: 24 additions & 18 deletions client/settings/express-checkout/woopay-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,33 @@ const WooPayExpressCheckoutItem = (): React.ReactElement => {
<div className="express-checkout__row">
<div className="express-checkout__checkbox">
{ isStripeLinkEnabled ? (
<HoverTooltip
content={ __(
'To enable WooPay, you must first disable Link by Stripe.',
'woocommerce-payments'
) }
>
<div className="loadable-checkbox__icon">
<NoticeOutlineIcon />
<div
className="loadable-checkbox__icon-warning"
data-testid="loadable-checkbox-icon-warning"
>
<VisuallyHidden>
{ __(
'WooPay cannot be enabled at checkout. Click to expand.',
<div className="components-base-control components-checkbox-control">
<div className="components-base-control__field">
<span className="components-checkbox-control__input-container">
<HoverTooltip
content={ __(
'To enable WooPay, you must first disable Link by Stripe.',
'woocommerce-payments'
) }
</VisuallyHidden>
</div>
>
<div className="loadable-checkbox__icon">
<NoticeOutlineIcon />
<div
className="loadable-checkbox__icon-warning"
data-testid="loadable-checkbox-icon-warning"
>
<VisuallyHidden>
{ __(
'WooPay cannot be enabled at checkout. Click to expand.',
'woocommerce-payments'
) }
</VisuallyHidden>
</div>
</div>
</HoverTooltip>
</span>
</div>
</HoverTooltip>
</div>
) : (
<CheckboxControl
label={ __(
Expand Down

0 comments on commit 04878e2

Please sign in to comment.