FIX changing the heading wrapper html tag from section to div
This commit is contained in:
parent
44ee6d61c3
commit
03bfa6ba7b
|
|
@ -34,7 +34,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
</ToggleGroupControl>
|
||||
</PanelBody>
|
||||
</InspectorControls>
|
||||
<section
|
||||
<div
|
||||
{...useBlockProps({
|
||||
className: `carhop-heading carhop-heading--hierarchy-${hierarchy}`,
|
||||
})}
|
||||
|
|
@ -42,17 +42,17 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
<div className="carhop-heading__innerblocks">
|
||||
<InnerBlocks
|
||||
template={[
|
||||
[
|
||||
"core/heading",
|
||||
{ placeholder: "Saisir le titre", content: "Titre" },
|
||||
],
|
||||
[
|
||||
"core/paragraph",
|
||||
{
|
||||
placeholder: "Saisir le sous-titre supérieur",
|
||||
content: "Sous-titre supérieur",
|
||||
content: "Sous-titre",
|
||||
},
|
||||
],
|
||||
[
|
||||
"core/heading",
|
||||
{ placeholder: "Saisir le titre", content: "Titre" },
|
||||
],
|
||||
]}
|
||||
allowedBlocks={[
|
||||
"core/heading",
|
||||
|
|
@ -61,7 +61,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
]}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
|
|||
export default function save({ attributes }) {
|
||||
const { hierarchy } = attributes;
|
||||
return (
|
||||
<section
|
||||
<div
|
||||
{...useBlockProps.save({
|
||||
className: `carhop-heading carhop-heading--hierarchy-${hierarchy}`,
|
||||
})}
|
||||
|
|
@ -11,6 +11,6 @@ export default function save({ attributes }) {
|
|||
<div className="carhop-heading__innerblocks">
|
||||
<InnerBlocks.Content />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user