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 (
|
return (
|
||||||
<CheckboxControl checked={checked} onChange={setChecked}>
|
<CheckboxControl
|
||||||
<RawHTML>{text || defaultText}</RawHTML>
|
checked={checked}
|
||||||
</CheckboxControl>
|
onChange={setChecked}
|
||||||
|
label={<RawHTML>{text || defaultText}</RawHTML>}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,11 @@ export function Edit({
|
|||||||
<div {...blockProps}>
|
<div {...blockProps}>
|
||||||
{optinEnabled ? (
|
{optinEnabled ? (
|
||||||
<div className="wc-block-checkout__marketing">
|
<div className="wc-block-checkout__marketing">
|
||||||
<CheckboxControl id="mailpoet-marketing-optin" checked={false} />
|
<CheckboxControl
|
||||||
|
id="mailpoet-marketing-optin"
|
||||||
|
checked={false}
|
||||||
|
onChange={() => {}}
|
||||||
|
/>
|
||||||
<RichText
|
<RichText
|
||||||
value={currentText}
|
value={currentText}
|
||||||
onChange={(value) => setAttributes({ text: value })}
|
onChange={(value) => setAttributes({ text: value })}
|
||||||
|
Reference in New Issue
Block a user