@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
27 lines (25 loc) • 922 B
JavaScript
import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import { useDialogContext } from "./context.js";
import { H4 } from "../heading/headings.js";
import { jsx } from "react/jsx-runtime";
//#region src/dialog/dialogTitle.tsx
/** Shows a title in the Dialog Header. Receives id linked to aria-labelledby on the Dialog for accessibility. */
const DialogTitle = vui((props, ref) => {
const { className, ...rest } = props;
const { titleId } = useDialogContext() ?? {};
const styles = useStyleConfig("Dialog", useDialogContext());
return /* @__PURE__ */ jsx(H4, {
className: cs("vui-dialogTitle", className),
id: titleId,
ref,
...styles.title,
...rest
});
});
DialogTitle.displayName = "DialogTitle";
//#endregion
export { DialogTitle, DialogTitle as default };
globalThis.__vuiVersion__ = "5.3.1"
//# sourceMappingURL=dialogTitle.js.map