// // Copyright 2026 DXOS.org // import React, { type ComponentPropsWithoutRef, forwardRef, useEffect, useId, useState } from 'react'; import { mx } from '@dxos/ui-theme'; import { type ThemedClassName } from '@dxos/ui-types'; import { recipes } from '../../recipes.ts'; import { type DateLike, compactInterval, formatCompact, toDate } from '../../util/format-time.ts'; import * as Tooltip from '../Tooltip/Tooltip.tsx'; export type TimestampProps = ThemedClassName, 'children' | 'dateTime'>> & { /** The instant shown, as an ISO string, a Unix timestamp in milliseconds, or a Date. */ date: DateLike; /** The instant to measure against, so a story or test does not move with the wall clock; live otherwise. */ now?: Date; }; /** * A `