@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
16 lines (15 loc) • 481 B
TypeScript
import { Dayjs } from 'dayjs';
import React from 'react';
import { TooltipProps } from '../Tooltip/Tooltip.js';
export interface Props {
date: Dayjs | Date | number | string;
tooltipPlacement?: TooltipProps['placement'];
delay?: TooltipProps['delay'];
}
/**
* Component to render a date or timestamp as relative time.
*
* @example
* <Timestamp date={new Date()} />
*/
export default function Timestamp({ date, tooltipPlacement, delay }: Props): React.JSX.Element;