[react] feat: Added docs for components/Number
This commit is contained in:
parent
062eb497e9
commit
fa5bad3d07
4 changed files with 46 additions and 5 deletions
|
@ -0,0 +1,19 @@
|
|||
import React from 'react'
|
||||
import { NumberCircle } from '@freesewing/react/components/Number'
|
||||
|
||||
const colors = ['primary', 'secondary', 'accent', 'neutral', 'success', 'warning', 'error', 'info']
|
||||
|
||||
export const NumberCircleExample = () => (
|
||||
<div className="tw:flex tw:flex-col tw:flex-wrap tw:gap-2 tw:items-start">
|
||||
<div className="tw:p-2">
|
||||
<b>Default props</b>
|
||||
<NumberCircle nr="1" />
|
||||
</div>
|
||||
{colors.map((c, i) => (
|
||||
<div className="tw:p-2" key={i}>
|
||||
<b>color = {c}</b>
|
||||
<NumberCircle nr={i} color={c}/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)
|
|
@ -1,7 +1,19 @@
|
|||
---
|
||||
title: Number
|
||||
---
|
||||
import { DocusaurusDoc } from '@freesewing/react/components/Docusaurus'
|
||||
import { ComponentDocs } from '@site/src/components/component-docs.js'
|
||||
import * as jsdoc from '@site/prebuild/jsdoc/components.number.mjs'
|
||||
import { NumberCircleExample } from './_examples.js'
|
||||
|
||||
:::note
|
||||
This page is yet to be created
|
||||
:::
|
||||
|
||||
<DocusaurusDoc>
|
||||
|
||||
The __Number__ component family provides the following components:
|
||||
|
||||
- [NumberCircle](#numbercircle)
|
||||
|
||||
## NumberCircle
|
||||
<ComponentDocs docs={jsdoc.jsdocNumberCircle} example={NumberCircleExample} />
|
||||
|
||||
</DocusaurusDoc>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue