import { useBlockProps } from "@wordpress/block-editor"; export default function save({ attributes }) { const { hasStickyLegend, hasLightbox, legendLocation, hasFixedHeight, hasRoundedShadow, showTitle, pictureUrl, pictureAlt, pictureTitle, pictureCaption, } = attributes; const renderCaption = () => (
{showTitle && pictureTitle && ( {pictureTitle} )}{" "} {pictureCaption}
); return ( <> {pictureUrl && (
{legendLocation === "before" && renderCaption()} {pictureAlt} {legendLocation === "after" && renderCaption()}
)} ); }