[react] feat: Added docs for components/Time
This commit is contained in:
parent
88d0c92a6d
commit
b50228e0f9
4 changed files with 96 additions and 8 deletions
|
@ -0,0 +1,9 @@
|
|||
import React from 'react'
|
||||
import { DateAndTime, TimeAgo, TimeToGo, TimeAgoBrief, TimeToGoBrief } from '@freesewing/react/components/Time'
|
||||
|
||||
export const DateAndTimeExample = () => <DateAndTime iso="2025-05-29T12:34:00.000Z" />
|
||||
export const TimeAgoExample = () => <TimeAgo iso="2025-05-21T12:34:00.000Z" />
|
||||
export const TimeToGoExample = () => <TimeToGo iso="2035-05-29T12:34:00.000Z" />
|
||||
export const TimeAgoBriefExample = () => <TimeAgoBrief time={1748000000000} />
|
||||
export const TimeToGoBriefExample = () => <TimeToGoBrief time={1900000000000} />
|
||||
|
|
@ -2,6 +2,43 @@
|
|||
title: Time
|
||||
---
|
||||
|
||||
:::note
|
||||
This page is yet to be created
|
||||
:::
|
||||
import { DocusaurusDoc } from '@freesewing/react/components/Docusaurus'
|
||||
import { ComponentDocs } from '@site/src/components/component-docs.js'
|
||||
import * as jsdoc from '@site/prebuild/jsdoc/components.time.mjs'
|
||||
import { TimeToGoExample, TimeAgoExample, TimeToGoBriefExample, TimeAgoBriefExample, DateAndTimeExample } from './_examples.js'
|
||||
|
||||
<DocusaurusDoc>
|
||||
|
||||
- [Components](#components)
|
||||
|
||||
## Components
|
||||
|
||||
The **Table** component family provides the following components:
|
||||
|
||||
- [DateAndTime](#dateandtime)
|
||||
- [TimeAgo](#timeago)
|
||||
- [TimeAgoBrief](#timeagobrief)
|
||||
- [TimeToGo](#timetogo)
|
||||
- [TimeToGoBrief](#timetogobrief)
|
||||
|
||||
### DateAndTime
|
||||
|
||||
<ComponentDocs docs={jsdoc.jsdocDateAndTime} example={DateAndTimeExample} />
|
||||
|
||||
### TimeAgo
|
||||
|
||||
<ComponentDocs docs={jsdoc.jsdocTimeAgo} example={TimeAgoExample} />
|
||||
|
||||
### TimeAgoBrief
|
||||
|
||||
<ComponentDocs docs={jsdoc.jsdocTimeAgoBrief} example={TimeAgoBriefExample} />
|
||||
|
||||
### TimeToGo
|
||||
|
||||
<ComponentDocs docs={jsdoc.jsdocTimeToGo} example={TimeToGoExample} />
|
||||
|
||||
### TimeToGoBrief
|
||||
|
||||
<ComponentDocs docs={jsdoc.jsdocTimeToGoBrief} example={TimeToGoBriefExample} />
|
||||
|
||||
</DocusaurusDoc>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue