@rtdui/datatable
Version: 
React DataTable component based on Rtdui components
28 lines (25 loc) • 738 B
JavaScript
'use client';
import { jsx } from 'react/jsx-runtime';
import React from 'react';
import clsx from 'clsx';
function IndeterminateCheckbox(props) {
  const { indeterminate, className = "", ...other } = props;
  const ref = React.useRef(null);
  React.useEffect(() => {
    if (typeof indeterminate === "boolean") {
      ref.current.indeterminate = !other.checked && indeterminate;
    }
  }, [other.checked, indeterminate]);
  return /* @__PURE__ */ jsx(
    "input",
    {
      type: "checkbox",
      ref,
      className: clsx("checkbox checkbox-xs rounded-sm", className),
      onClick: (ev) => ev.stopPropagation(),
      ...other
    }
  );
}
export { IndeterminateCheckbox };
//# sourceMappingURL=IndeterminateCheckbox.mjs.map