import React from 'react'; import { Section } from '@teambit/documenter.ui.section'; import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions'; import { Separator } from '@teambit/documenter.ui.separator'; import { H3 } from '@teambit/documenter.ui.heading'; import { Paragraph } from '@teambit/documenter.ui.paragraph'; import { TimeAgo } from './time-ago'; export default function Overview() { return (

Overview

Time-ago displays the time passed since a specific date (received as a prop).
); } Overview.abstract = 'Displays the time passed since a specific date.'; Overview.labels = ['react', 'typescript', 'time', 'date']; Overview.examples = [ { scope: { TimeAgo, }, title: 'Years time ago', description: 'Using the component with years ago timestamp', jsx: , }, { scope: { TimeAgo, }, title: 'Months time ago', description: 'Using the component with months time ago', code: ` () => { const date = new Date(); return ; } `, }, { scope: { TimeAgo, }, title: 'Hours time ago', description: 'Using the component with hours time ago', code: ` () => { const date = new Date(); return ; } `, }, { scope: { TimeAgo, }, title: 'Current time', description: 'Using the component with current time', jsx: , }, { scope: { TimeAgo, }, title: 'Tooltip', description: 'Using the component with tooltip', jsx: , }, ];