tldraw
Version:
A tiny little drawing editor.
28 lines (27 loc) • 956 B
JavaScript
import { jsx } from "react/jsx-runtime";
import {
stopEventPropagation,
usePassThroughMouseOverEvents,
usePassThroughWheelEvents
} from "@tldraw/editor";
import classNames from "classnames";
import React from "react";
import { TldrawUiToolbar } from "./TldrawUiToolbar.mjs";
const TldrawUiContextualToolbar = React.forwardRef(function TldrawUiContextualToolbar2({ children, className, label }, toolbarRef) {
usePassThroughWheelEvents(toolbarRef);
usePassThroughMouseOverEvents(toolbarRef);
return /* @__PURE__ */ jsx(
"div",
{
ref: toolbarRef,
"data-testid": "contextual-toolbar",
className: classNames("tlui-contextual-toolbar", className),
onPointerDown: stopEventPropagation,
children: /* @__PURE__ */ jsx(TldrawUiToolbar, { className: "tlui-menu tlui-buttons__horizontal", label, children })
}
);
});
export {
TldrawUiContextualToolbar
};
//# sourceMappingURL=TldrawUiContextualToolbar.mjs.map