UNPKG

react-three-state-checkbox

Version:

React component for checkbox that supports the indeterminate state conveniently. Edit

20 lines 795 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const Checkbox = ({ checked, indeterminate = false, className = '', style = {}, disabled = false, onChange }) => { return ((0, jsx_runtime_1.jsx)("input", { type: "checkbox", className: className, style: style, ref: input => { /* istanbul ignore else */ if (input) { input.checked = checked; input.indeterminate = indeterminate; input.disabled = disabled; } }, onChange: e => { /* istanbul ignore else */ if (onChange) { onChange(e); } } })); }; exports.default = Checkbox; //# sourceMappingURL=Checkbox.js.map