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