import { __ } from "@wordpress/i18n"; import { useBlockProps, RichText, InspectorControls, __experimentalLinkControl as LinkControl, useSetting, } from "@wordpress/block-editor"; import { PanelBody } from "@wordpress/components"; import "./editor.scss"; import { BlockControls, AlignmentToolbar } from "@wordpress/block-editor"; import { ColorPalette, PanelRow } from "@wordpress/components"; import { Tip } from "@wordpress/components"; import { ReactComponent as ArrowIcon } from "./img/carhop-fleche-lien-externe-full.svg"; export default function Edit({ attributes, setAttributes }) { const { color, link } = attributes; const colors = useSetting("color.palette.theme"); function handleColorChange(value) { setAttributes({ color: value }); } return ( <> setAttributes({ align: value })} />
{ setAttributes({ link: value }); }} />
{ handleColorChange(value); }} colors={colors} disableCustomColors={true} />
setAttributes({ text })} allowedFormats={[]} /> {/*
*/}
); }