[react] feat: Added docs for components/KeyVal
This commit is contained in:
parent
8025dc2577
commit
30e5d37c96
4 changed files with 53 additions and 3 deletions
|
@ -0,0 +1,21 @@
|
|||
import React from 'react'
|
||||
import { KeyVal } from '@freesewing/react/components/KeyVal'
|
||||
|
||||
const colors = ['primary', 'secondary', 'accent', 'neutral', 'success', 'warning', 'error', 'info']
|
||||
|
||||
export const KeyValExample = () => (
|
||||
<>
|
||||
<b>Default</b>
|
||||
<br />
|
||||
<KeyVal k="key" val="value" />
|
||||
<br />
|
||||
<b>Colors</b>
|
||||
<div className="tw:flex tw:flex-row tw:flex-wrap tw:gap-1">
|
||||
{colors.map(c => <KeyVal key={c} k="color" val={c} color={c}/>)}
|
||||
</div>
|
||||
<b>Small</b>
|
||||
<div className="tw:flex tw:flex-row tw:flex-wrap tw:gap-1">
|
||||
{colors.map(c => <KeyVal key={c} k="color" val={c} color={c} small/>)}
|
||||
</div>
|
||||
</>
|
||||
)
|
|
@ -1,7 +1,21 @@
|
|||
---
|
||||
title: KeyVal
|
||||
---
|
||||
import { DocusaurusDoc } from '@freesewing/react/components/Docusaurus'
|
||||
import { ComponentDocs } from '@site/src/components/component-docs.js'
|
||||
import * as jsdoc from '@site/prebuild/jsdoc/components.keyval.mjs'
|
||||
import { KeyValExample } from './_examples.js'
|
||||
|
||||
|
||||
<DocusaurusDoc>
|
||||
|
||||
The __KeyVal component family provides the following components:
|
||||
|
||||
- [KeyVal](#keyval)
|
||||
|
||||
## KeyVal
|
||||
<ComponentDocs docs={jsdoc.jsdocKeyVal} example={KeyValExample} />
|
||||
|
||||
</DocusaurusDoc>
|
||||
|
||||
|
||||
:::note
|
||||
This page is yet to be created
|
||||
:::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue