UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

35 lines (31 loc) 1.43 kB
"use client"; const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs'); const require_factory = require('../../core/system/factory.cjs'); const require_create_component = require('../../core/components/create-component.cjs'); const require_format_byte_style = require('./format-byte.style.cjs'); const require_use_format_byte = require('./use-format-byte.cjs'); let react_jsx_runtime = require("react/jsx-runtime"); react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime); //#region src/components/format/format-byte.tsx const { PropsContext: FormatBytePropsContext, usePropsContext: useFormatBytePropsContext, withContext } = require_create_component.createComponent("format-byte", require_format_byte_style.formatByteStyle); /** * `Format` is used to format dates, numbers, and bytes according to a specific locale. * * @see https://yamada-ui.com/docs/components/format */ const FormatByte = withContext(({ locale, unit, unitDisplay, value,...rest }) => { const text = require_use_format_byte.useFormatByte(value, { locale, unit, unitDisplay }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.span, { ...rest, children: text }); })(); //#endregion exports.FormatByte = FormatByte; exports.FormatBytePropsContext = FormatBytePropsContext; exports.useFormatBytePropsContext = useFormatBytePropsContext; //# sourceMappingURL=format-byte.cjs.map