package.dist.components.format.format-byte.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react Show documentation
Show all versions of react Show documentation
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
The newest version!
'use client';
import { jsx, Fragment } from 'react/jsx-runtime';
import { formatBytes } from '@zag-js/i18n-utils';
import { useMemo } from 'react';
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
const FormatByte = (props) => {
const { value, ...intlOptions } = props;
const { locale } = useLocaleContext();
const text = useMemo(() => formatBytes(value, locale, intlOptions), [value, locale, intlOptions]);
return /* @__PURE__ */ jsx(Fragment, { children: text });
};
FormatByte.displayName = "FormatByte";
export { FormatByte };
© 2015 - 2025 Weber Informatics LLC | Privacy Policy