import { useBlockProps } from "@wordpress/block-editor"; import { arrowIcons } from "../../controls/constants"; import classNames from "classnames"; const ButtonSave = ({ attributes }) => { const { uniqueId, buttonLabel, iconSource, buttonStyle, hoverEffects, buttonLink, openNewTab, enableIcon, additionalCssClass, buttonLabelEnable, buttonLabelGlobalTypography, } = attributes; const blockProps = useBlockProps.save({ className: additionalCssClass, }); const BtnIcon = arrowIcons[iconSource]; return (
{enableIcon && ( )} {buttonLabelEnable && ( {buttonLabel} )}
{hoverEffects === "flip" && (
{iconSource && ( )} {buttonLabelEnable && ( {buttonLabel} )}
)}
); }; export default ButtonSave;