UNPKG

@yamada-ui/react

Version:

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

53 lines (49 loc) 1.94 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_date_time_style = require('./format-date-time.style.cjs'); const require_use_format_date_time = require('./use-format-date-time.cjs'); let react_jsx_runtime = require("react/jsx-runtime"); react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime); //#region src/components/format/format-date-time.tsx const { PropsContext: FormatDateTimePropsContext, usePropsContext: useFormatDateTimePropsContext, withContext } = require_create_component.createComponent("format-date-time", require_format_date_time_style.formatDateTimeStyle); /** * `Format` is used to format dates, numbers, and bytes according to a specific locale. * * @see https://yamada-ui.com/docs/components/format */ const FormatDateTime = withContext(({ calendar, dateStyle, day, dayPeriod, era, formatMatcher, fractionalSecondDigits, hour, hour12, hourCycle, locale, localeMatcher, minute, month, numberingSystem, second, timeStyle, timeZone, timeZoneName, value, weekday, year,...rest }) => { const text = require_use_format_date_time.useFormatDateTime(value, { calendar, dateStyle, day, dayPeriod, era, formatMatcher, fractionalSecondDigits, hour, hour12, hourCycle, locale, localeMatcher, minute, month, numberingSystem, second, timeStyle, timeZone, timeZoneName, weekday, year }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.span, { ...rest, children: text }); })(); //#endregion exports.FormatDateTime = FormatDateTime; exports.FormatDateTimePropsContext = FormatDateTimePropsContext; exports.useFormatDateTimePropsContext = useFormatDateTimePropsContext; //# sourceMappingURL=format-date-time.cjs.map