UNPKG

@explita/daily-toolset-components

Version:

A lightweight and versatile collection of TypeScript utility functions and form components, inspired by ShadCN UI, designed for seamless everyday development. Enhance your Node.js, React, and Next.js projects with a well-structured suite of helpers for st

16 lines (15 loc) 833 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Checkbox = Checkbox; const react_1 = __importDefault(require("react")); const checkbox_1 = require("../ui/checkbox"); const react_2 = require("react"); function Checkbox({ isChecked = false, isDisabled, handleCheck, label, }) { const id = (0, react_2.useId)(); return (react_1.default.createElement("div", { className: "explita-checkbox-root" }, react_1.default.createElement(checkbox_1.Checkbox, { id: id, disabled: isDisabled, checked: isChecked, onCheckedChange: handleCheck ? handleCheck : undefined }), label && react_1.default.createElement("label", { htmlFor: id }, label))); }