29 lines
720 B
JavaScript
29 lines
720 B
JavaScript
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
|
|
|
export default function save({ attributes }) {
|
|
let { chapterLinkTitle, chapterLinkDescription, chapterLinkRelatedPostUrl } =
|
|
attributes;
|
|
|
|
return (
|
|
<div
|
|
{...useBlockProps.save({
|
|
className: `homegrade-blocks-lien-chapitre`,
|
|
})}
|
|
>
|
|
<RichText.Content
|
|
tagName="h4"
|
|
value={chapterLinkTitle}
|
|
className="homegrade-blocks-lien-chapitre__title"
|
|
/>
|
|
<RichText.Content
|
|
tagName="p"
|
|
value={chapterLinkDescription}
|
|
className="homegrade-blocks-lien-chapitre__description"
|
|
/>
|
|
{chapterLinkRelatedPostUrl && (
|
|
<a href={chapterLinkRelatedPostUrl}>{chapterLinkRelatedPostUrl}</a>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|