UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

17 lines (16 loc) 1.03 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { forwardRef } from "react"; import { useDialogRoot } from "./context.js"; import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal"; import { useSlot } from "../../../hooks/use-slot/use-slot.js"; const DialogArrowBase = ({ render, ...props }, ref) => { const ctx = useDialogRoot(); const combined = useCombinedRefs(ref, ctx.setArrow); const comp = useSlot({ props: [props], ref: combined, slot: render ?? (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 8", "aria-hidden": true, height: 8, focusable: "false", ...props, ref: combined, "data-ln-dialog-arrow": true, children: [_jsx("polygon", { points: "0,8 8,0 16,8", "data-ln-dialog-arrow-area": true }), _jsx("path", { "data-ln-dialog-arrow-border": true, d: "M0 8 L8 0 L16 8", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" })] })), }); return comp; }; export const DialogArrow = forwardRef(DialogArrowBase);