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

30 lines
928 B
Plaintext

"use client";
// src/resizable-panel.tsx
import { forwardRef } from "react";
import { domAnimation, LazyMotion, m } from "framer-motion";
import { useMeasure } from "@heroui/use-measure";
import { jsx } from "react/jsx-runtime";
var ResizablePanel = forwardRef(
(originalProps, ref) => {
const { children, ...props } = originalProps;
let [measureRef, bounds] = useMeasure();
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(
m.div,
{
ref,
animate: {
width: bounds.width && (bounds == null ? void 0 : bounds.width) > 0 ? bounds.width : "auto",
height: bounds.height && bounds.height > 0 ? bounds.height : "auto"
},
children: /* @__PURE__ */ jsx("div", { ref: measureRef, ...props, children })
}
) });
}
);
ResizablePanel.displayName = "HeroUI - ResizablePanel";
export {
ResizablePanel
};