mirror of
https://github.com/mailpoet/mailpoet.git
synced 2025-03-13 16:48:04 +00:00
Merge de1e6c6cd7d0271039b634326d2178d95e807282 into 4de580b7dfb4c2785828d5d910b558a007e94547
This commit is contained in:
commit
daad7d666b
8
mailpoet/assets/js/src/global.d.ts
vendored
8
mailpoet/assets/js/src/global.d.ts
vendored
@ -39,13 +39,13 @@ interface JQuery {
|
||||
declare module '@woocommerce/blocks-checkout' {
|
||||
type CheckboxControlProps = {
|
||||
className?: string;
|
||||
label?: string;
|
||||
label?: string | React.ReactNode;
|
||||
id?: string;
|
||||
instanceId?: string;
|
||||
onChange?: (value: boolean) => void;
|
||||
children?: React.ReactChildren | React.ReactElement;
|
||||
onChange: (value: boolean) => void;
|
||||
children?: React.ReactChildren;
|
||||
hasError?: boolean;
|
||||
checked?: boolean;
|
||||
disabled?: string | boolean | undefined;
|
||||
};
|
||||
export const CheckboxControl: (props: CheckboxControlProps) => JSX.Element;
|
||||
}
|
||||
|
@ -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 })}
|
||||
|
Loading…
x
Reference in New Issue
Block a user