UNPKG

@react-awesome-query-builder/ui

Version:
21 lines 502 B
import React from "react"; var typeToLabel = { "addSubRuleSimple": "+", "addSubRule": "+", "addSubGroup": "+", "delGroup": "x", "delRuleGroup": "x", "delRule": "x" }; export default (function (_ref) { var type = _ref.type, label = _ref.label, onClick = _ref.onClick, readonly = _ref.readonly; var btnLabel = label || typeToLabel[type]; return /*#__PURE__*/React.createElement("button", { onClick: onClick, type: "button", disabled: readonly }, btnLabel); });