UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

31 lines (30 loc) 1.07 kB
import React from 'react'; import { InternalLocale } from '../../shared/Context'; import { SpacingProps } from '../space/types'; import { SkeletonShow } from '../Skeleton'; type DateFormatProps = SpacingProps & { /** * The date that will be formatted. */ value?: Date | string; /** * Defines the style used to format the date. Defaults to `long`. * Defaults to `long`. */ dateStyle?: Intl.DateTimeFormatOptions['dateStyle']; /** * A string in {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument | Intl.DateTimeFormat locale} accepted format. * Defaults to `nb-NO` */ locale?: InternalLocale; /** * If set to `true`, an overlaying skeleton with animation will be shown. */ skeleton?: SkeletonShow; children?: React.ReactNode; }; declare function DateFormat(props: DateFormatProps): import("react/jsx-runtime").JSX.Element; declare namespace DateFormat { var _supportsSpacingProps: boolean; } export default DateFormat;