Files
NapCatQQ/.pnpm-store/v3/files/da/aac52c700c44f0f93df692e82495e58b17163698c63bb9d966944fef6a48f322a3eadebaf94f4b095cde0f0cffe82fc1c6977b926eff49f88b7bfa91a1b7cd
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

37 lines
1.0 KiB
Plaintext

"use client";
import {
CheckboxIcon
} from "./chunk-FFVF7OUL.mjs";
import {
useCheckbox
} from "./chunk-VBM6YDUQ.mjs";
// src/checkbox.tsx
import { forwardRef } from "@heroui/system";
import { cloneElement } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
var Checkbox = forwardRef((props, ref) => {
const {
Component,
children,
icon = /* @__PURE__ */ jsx(CheckboxIcon, {}),
getBaseProps,
getWrapperProps,
getInputProps,
getIconProps,
getLabelProps
} = useCheckbox({ ...props, ref });
const clonedIcon = typeof icon === "function" ? icon(getIconProps()) : cloneElement(icon, getIconProps());
return /* @__PURE__ */ jsxs(Component, { ...getBaseProps(), children: [
/* @__PURE__ */ jsx("input", { ...getInputProps() }),
/* @__PURE__ */ jsx("span", { ...getWrapperProps(), children: clonedIcon }),
children && /* @__PURE__ */ jsx("span", { ...getLabelProps(), children })
] });
});
Checkbox.displayName = "HeroUI.Checkbox";
var checkbox_default = Checkbox;
export {
checkbox_default
};