daily-toolset
Version:
A lightweight, versatile collection of TypeScript utility functions for everyday development needs. Simplify and streamline your Node.js, React, and Next.js projects with a powerful suite of well-organized helpers for strings, arrays, dates, objects, and
11 lines (10 loc) • 695 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Checkbox = Checkbox;
const jsx_runtime_1 = require("react/jsx-runtime");
const checkbox_1 = require("../../components/ui/checkbox");
const react_1 = require("react");
function Checkbox({ isChecked = false, isDisabled, handleCheck, label, }) {
const id = (0, react_1.useId)();
return ((0, jsx_runtime_1.jsxs)("div", { className: "explita-checkbox-root", children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { id: id, disabled: isDisabled, checked: isChecked, onCheckedChange: handleCheck ? handleCheck : undefined }), label && (0, jsx_runtime_1.jsx)("label", { htmlFor: id, children: label })] }));
}
;