
package.dist.components.format.format-number.js Maven / Gradle / Ivy
'use client';
import { jsx, Fragment } from 'react/jsx-runtime';
import { formatNumber } from '@zag-js/i18n-utils';
import { useMemo } from 'react';
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
const FormatNumber = (props) => {
const { value, ...intlOptions } = props;
const { locale } = useLocaleContext();
const text = useMemo(() => formatNumber(value, locale, intlOptions), [value, locale, intlOptions]);
return /* @__PURE__ */ jsx(Fragment, { children: text });
};
FormatNumber.displayName = "FormatNumber";
export { FormatNumber };
© 2015 - 2025 Weber Informatics LLC | Privacy Policy