import { __ } from "@wordpress/i18n"; import { useState } from "@wordpress/element"; import { ButtonGroup, ColorPicker, Spacing, ToggleControl } from "@easy-accordion/components"; const BoxShadow = ({ attributes, attributesKey, setAttributes, defaultShadowColor = "#949494" }) => { const [buttonTab, setButtonTab] = useState("color"); const shadowColor = (newColor) => { setAttributes({ [attributesKey]: { ...attributes, [buttonTab]: newColor }, }); }; const isActiveShadow = attributes?.isActive; return (
setAttributes({ [attributesKey]: { ...attributes, isActive: !isActiveShadow } })} /> {isActiveShadow && ( <> {/* Shadow Color */} {attributes?.hoverColor && ( setButtonTab(value)} /> )} )}
); }; export default BoxShadow;