ToggleFilter = ({
  name,
  value,
  preset_value,
  block,
  label,
  size,
  style,
}) => {
  const {
    selected,
    connectors: { connect, drag },
  } = useNode((node) => ({ selected: node.events.selected }));
  return (
    <span
      className={selected ? "selected-node" : ""}
      {...blockProps(block)}
      ref={(dom) => connect(drag(dom))}
    >
      <button className={`btn btn-outline-${style || "primary"} ${size}`}>
        {label || value || preset_value || "Set label"}
      </button>
    </span>
  );
}
@param {object} props
@param {*} props.name
@param {string} [props.value]
@param {string} [props.preset_value]
@param {boolean} props.block
@param {string} [props.label]
@param {string} props.size
@param {string} props.style
@returns {table}
@namespace
@category saltcorn-builder
@subcategory components