import "./editor.scss"; const ButtonSet = ({ label = "", attributes, attributesKey, setAttributes, columns = 4, items, onChange = false }) => { const handleClick = (value) => { if (value === attributes) { return; } if (onChange) { onChange(value); } else { setAttributes({ [attributesKey]: value }); } }; return (
{label && (
{label}
)}
{items?.map((item, index) => ( handleClick(item.value)} > {item.label} {item.tooltip &&

{item.tooltip}

}
))}
); }; export default ButtonSet;