carhop__plugins__PROD-DEV/plugins/carhop-blocks/blocks/heading/src/edit.js
Antoine M 7648224015
All checks were successful
continuous-integration/drone/push Build is passing
FEATURE Handling core-title as innerBlock
2025-10-07 09:51:19 +02:00

39 lines
781 B
JavaScript

import { __ } from "@wordpress/i18n";
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
import "./editor.scss";
export default function Edit() {
return (
<>
<section
{...useBlockProps({
className: "carhop-heading",
})}
>
<div className="carhop-heading__innerblocks">
<InnerBlocks
template={[
[
"core/paragraph",
{
placeholder: "Saisir le sous-titre supérieur",
content: "Sous-titre supérieur",
},
],
[
"core/heading",
{ placeholder: "Saisir le titre", content: "Titre" },
],
]}
allowedBlocks={[
"core/heading",
"core/paragraph",
"core/post-title",
]}
/>
</div>
</section>
</>
);
}