@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
21 lines (20 loc) • 643 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { useDialogRoot } from "./context.js";
import { useSlot } from "../../../hooks/use-slot/use-slot.js";
function DialogTitleBase({ render, ...props }, ref) {
const ctx = useDialogRoot();
const internalProps = {
id: ctx.titleId,
};
const final = useSlot({
props: [internalProps, props, { "data-ln-dialog-title": "true" }],
ref: ref,
slot: render ?? _jsx("h2", {}),
state: {
id: ctx.titleId,
},
});
return final;
}
export const DialogTitle = forwardRef(DialogTitleBase);