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