1
0
Fork 0

[react] feat: Added docs for components/Tab

This commit is contained in:
joostdecock 2025-05-29 12:35:43 +02:00
parent b6d947646c
commit f92a182992
4 changed files with 58 additions and 12 deletions

View file

@ -0,0 +1,12 @@
import React from 'react'
import { Tab, Tabs } from '@freesewing/react/components/Tab'
import { MiniNote } from '@freesewing/react/components/Mini'
export const TabExample = () => <MiniNote>Do not use a Tab component on its own, but only as direct children of a Tabs component.</MiniNote>
export const TabsExample = () => (
<Tabs tabs="Apple, Banana, Coconut">
<Tab>Apple tab</Tab>
<Tab>Banana tab</Tab>
<Tab>Coconut tab</Tab>
</Tabs>
)

View file

@ -2,6 +2,28 @@
title: Tab
---
:::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.tab.mjs'
import { TabExample, TabsExample } from './_examples.js'
<DocusaurusDoc>
- [Components](#components)
## Components
The **Tab** component family provides the following components:
- [Tab](#tab)
- [Tabs](#tabs)
### Tab
<ComponentDocs docs={jsdoc.jsdocTab} example={TabExample} />
### Tabs
<ComponentDocs docs={jsdoc.jsdocTabs} example={TabsExample} />
</DocusaurusDoc>