Files
NapCatQQ/.pnpm-store/v3/files/44/6f320d14f387ce0e7e624ee8c0bebdc716d49fd9744834a6de5c8494c172bd3f7662ab8c11e2885ab5a01b1c4481d0d13937b6c4901cac237bdb7f6f10c53c
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

39 lines
1.0 KiB
Plaintext

import {
useKbd
} from "./chunk-33JVVCIB.mjs";
import {
kbdKeysLabelMap,
kbdKeysMap
} from "./chunk-7BVYOJX6.mjs";
// src/kbd.tsx
import { useMemo } from "react";
import { forwardRef } from "@heroui/system-rsc";
import { jsx, jsxs } from "react/jsx-runtime";
var Kbd = forwardRef((props, ref) => {
const { Component, children, slots, classNames, keysToRender, getKbdProps } = useKbd({
...props
});
const keysContent = useMemo(() => {
return keysToRender.map((key) => /* @__PURE__ */ jsx(
"abbr",
{
className: slots.abbr({ class: classNames == null ? void 0 : classNames.abbr }),
title: kbdKeysLabelMap[key],
children: kbdKeysMap[key]
},
key
));
}, [keysToRender]);
return /* @__PURE__ */ jsxs(Component, { ref, ...getKbdProps(), children: [
keysContent,
children && /* @__PURE__ */ jsx("span", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children })
] });
});
Kbd.displayName = "HeroUI.Kbd";
var kbd_default = Kbd;
export {
kbd_default
};