import { __ } from "@wordpress/i18n"; import { PanelBody, Button, Tip, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from "@wordpress/components"; import { MediaReplaceFlow, MediaPlaceholder } from "@wordpress/block-editor"; import { trash } from "@wordpress/icons"; export default function ImagePanelBody({ imageUrl, imageAlt, imageId, imageProportion, setAttributes }) { function setImageAttributes(image) { setAttributes({ imageId: image.id, imageAlt: image.alt, imageUrl: image.url, imageCaption: image.caption, imageDescription: image.description, }); } function removeImageAttributes() { setAttributes({ imageId: null, imageAlt: null, imageUrl: null, imageCaption: null, imageDescription: null, }); } function onImageProportionChange(imageProportion) { setAttributes({ imageProportion }); } return ( <> {imageUrl && {imageAlt}}
{imageUrl && ( <>
Si besoin, Utilisez le champ "Légende"de la médiathèque pour afficher un copyright Si besoin, Utilisez le champ "Description" de la médiathèque pour donner afficher une description de votre image {imageUrl && ( )}
); }