koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
21 lines (20 loc) • 670 B
JavaScript
"use client";
import { jsx as n } from "react/jsx-runtime";
import { forwardRef as c, useMemo as f } from "react";
import i from "classnames";
import { useBrowserLocale as p } from "../../internal/locale/useBrowserLocale.js";
import u from "./Name.module.css.js";
const N = c(
({ className: o, locale: e, languageCode: a, ...m }, r) => {
const t = p(), s = e || t, l = f(
() => new Intl.DisplayNames(s, { type: "language" }).of(a),
[a, s]
);
return /* @__PURE__ */ n("span", { ...m, className: i(u.name, o), ref: r, children: l });
}
);
N.displayName = "NameLanguage";
export {
N as NameLanguage
};
//# sourceMappingURL=NameLanguage.js.map