UNPKG

@react-awesome-query-builder-dev/ui

Version:
23 lines 605 B
import React from "react"; export default (function (_ref) { var value = _ref.value, setValue = _ref.setValue, label = _ref.label, id = _ref.id, config = _ref.config, type = _ref.type; var onChange = function onChange(e) { return setValue(e.target.checked); }; var postfix = type; return [/*#__PURE__*/React.createElement("input", { key: id + postfix, type: "checkbox", id: id + postfix, checked: !!value, onChange: onChange }), /*#__PURE__*/React.createElement("label", { key: id + postfix + "label", htmlFor: id + postfix }, label)]; });