Skip to content

Commit

Permalink
Show a beta badge next to WooPay theme checkbox (#10000)
Browse files Browse the repository at this point in the history
  • Loading branch information
malithsen authored Dec 20, 2024
1 parent 3767447 commit cd650bd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changelog/add-beta-badge-woopay-theme
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: add
Comment: Adds a label to a gated feature.


12 changes: 12 additions & 0 deletions client/settings/express-checkout-settings/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@
}

.woopay-settings {
&__badge {
background-color: $studio-gray-5;
padding: 0 8px;
border-radius: 2px;
font-size: 12px;
line-height: 20px;
margin-left: 4px;
}
&__global-theme-label {
display: inline-flex;
align-items: center;
}
&__custom-message-wrapper {
position: relative;

Expand Down
15 changes: 11 additions & 4 deletions client/settings/express-checkout-settings/woopay-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,17 @@ const WooPaySettings = ( { section } ) => {
onChange={
updateIsWooPayGlobalThemeSupportEnabled
}
label={ __(
'Enable global theme support',
'woocommerce-payments'
) }
label={
<div className="woopay-settings__global-theme-label">
{ __(
'Enable global theme support',
'woocommerce-payments'
) }
<span className="woopay-settings__badge">
Beta
</span>
</div>
}
help={ interpolateComponents( {
mixedString: __(
'When enabled, WooPay checkout will be themed with your store’s brand colors and fonts. ' +
Expand Down

0 comments on commit cd650bd

Please sign in to comment.