Properly set block opt-in checkbox label to render with correct classes
This fixes verical misalignment between the checkbox and the label [MAILPOET-6436]
This commit is contained in:
committed by
Aschepikov
parent
1372de1bba
commit
a4d67a319a
@@ -30,8 +30,10 @@ export function FrontendBlock({
|
||||
}
|
||||
|
||||
return (
|
||||
<CheckboxControl checked={checked} onChange={setChecked}>
|
||||
<RawHTML>{text || defaultText}</RawHTML>
|
||||
</CheckboxControl>
|
||||
<CheckboxControl
|
||||
checked={checked}
|
||||
onChange={setChecked}
|
||||
label={<RawHTML>{text || defaultText}</RawHTML>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@@ -56,7 +56,11 @@ export function Edit({
|
||||
<div {...blockProps}>
|
||||
{optinEnabled ? (
|
||||
<div className="wc-block-checkout__marketing">
|
||||
<CheckboxControl id="mailpoet-marketing-optin" checked={false} />
|
||||
<CheckboxControl
|
||||
id="mailpoet-marketing-optin"
|
||||
checked={false}
|
||||
onChange={() => {}}
|
||||
/>
|
||||
<RichText
|
||||
value={currentText}
|
||||
onChange={(value) => setAttributes({ text: value })}
|
||||
|
Reference in New Issue
Block a user