1
0
Fork 0

[react] feat: Added docs for components/Json

This commit is contained in:
joostdecock 2025-05-24 12:22:21 +02:00
parent b914b6299f
commit 1b1cacdea3
4 changed files with 46 additions and 3 deletions

View file

@ -0,0 +1,20 @@
import React from 'react'
import { Json } from '@freesewing/react/components/Json'
export const JsonExample = () => (
<Json js={{
pizzas: [
{
size: 'lg',
toppings: ['tomato', 'pineapple', 'chorizo', 'mozarella'],
crust: 'classic'
},
{
size: 'lg',
toppings: ['tomato', 'pineapple', 'cupped_chorizo', 'mozarella'],
crust: 'cheesy'
},
],
pickup: false
}} />
)

View file

@ -1,7 +1,20 @@
---
title: Json
---
import { DocusaurusDoc } from '@freesewing/react/components/Docusaurus'
import { ComponentDocs } from '@site/src/components/component-docs.js'
import * as jsdoc from '@site/prebuild/jsdoc/components.json.mjs'
import { JsonExample } from './_examples.js'
<DocusaurusDoc>
The __Json__ component family provides the following components:
- [Json](#json)
## Json
<ComponentDocs docs={jsdoc.jsdocJson} example={JsonExample} />
</DocusaurusDoc>
:::note
This page is yet to be created
:::