Skip to content

Commit

Permalink
feat: add new components docs
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil committed Jul 9, 2024
1 parent 9074255 commit 72d8ff2
Show file tree
Hide file tree
Showing 32 changed files with 2,176 additions and 80 deletions.
6 changes: 5 additions & 1 deletion packages/AspectRatio/docs/examples/overview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as React from 'react'
import { AspectRatio } from '@welcome-ui/aspect-ratio'
import { Box } from '@welcome-ui/box'

const Example = () => {
return (
<AspectRatio maxWidth={200}>
<img src="https://images.unsplash.com/photo-1517849845537-4d257902454a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=500&q=80" />
<Box
as="img"
src="https://images.unsplash.com/photo-1517849845537-4d257902454a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=500&q=80"
/>
</AspectRatio>
)
}
Expand Down
5 changes: 5 additions & 0 deletions packages/Badge/docs/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Badge": {
"props": {}
}
}
5 changes: 5 additions & 0 deletions packages/Box/docs/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Box": {
"props": {}
}
}
214 changes: 214 additions & 0 deletions packages/Breadcrumb/docs/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
{
"Breadcrumb": {
"props": {
"gradientBackground": {
"defaultValue": {
"value": "light-900"
},
"description": "color from theme, add for scroll gradient on mobile",
"name": "gradientBackground",
"parent": {
"fileName": "Breadcrumb/src/index.tsx",
"name": "BreadcrumbOptions"
},
"declarations": [
{
"fileName": "Breadcrumb/src/index.tsx",
"name": "BreadcrumbOptions"
}
],
"required": false,
"type": {
"name": "any"
}
},
"lastChildNotClickable": {
"defaultValue": {
"value": true
},
"description": "set clickable or not the last child",
"name": "lastChildNotClickable",
"parent": {
"fileName": "Breadcrumb/src/index.tsx",
"name": "BreadcrumbOptions"
},
"declarations": [
{
"fileName": "Breadcrumb/src/index.tsx",
"name": "BreadcrumbOptions"
}
],
"required": false,
"type": {
"name": "enum",
"raw": "boolean",
"value": [
{
"value": "false"
},
{
"value": "true"
}
]
}
},
"separator": {
"defaultValue": {
"value": "<RightIcon size=\"xs\" />"
},
"description": "",
"name": "separator",
"parent": {
"fileName": "Breadcrumb/src/index.tsx",
"name": "BreadcrumbOptions"
},
"declarations": [
{
"fileName": "Breadcrumb/src/index.tsx",
"name": "BreadcrumbOptions"
}
],
"required": false,
"type": {
"name": "enum",
"raw": "ReactNode",
"value": [
{
"value": "string"
},
{
"value": "number"
},
{
"value": "false"
},
{
"value": "true"
},
{
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactFragment",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactPortal",
"description": "",
"fullComment": "",
"tags": {}
}
]
}
}
}
},
"Breadcrumb.Item": {
"props": {
"isActive": {
"defaultValue": null,
"description": "",
"name": "isActive",
"parent": {
"fileName": "Breadcrumb/src/Item.tsx",
"name": "ItemOptions"
},
"declarations": [
{
"fileName": "Breadcrumb/src/Item.tsx",
"name": "ItemOptions"
}
],
"required": false,
"type": {
"name": "enum",
"raw": "boolean",
"value": [
{
"value": "false"
},
{
"value": "true"
}
]
}
},
"separator": {
"defaultValue": null,
"description": "",
"name": "separator",
"parent": {
"fileName": "Breadcrumb/src/Item.tsx",
"name": "ItemOptions"
},
"declarations": [
{
"fileName": "Breadcrumb/src/Item.tsx",
"name": "ItemOptions"
}
],
"required": false,
"type": {
"name": "enum",
"raw": "ReactNode",
"value": [
{
"value": "string"
},
{
"value": "number"
},
{
"value": "false"
},
{
"value": "true"
},
{
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactFragment",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactPortal",
"description": "",
"fullComment": "",
"tags": {}
}
]
}
},
"to": {
"defaultValue": null,
"description": "",
"name": "to",
"parent": {
"fileName": "Breadcrumb/src/Item.tsx",
"name": "ItemOptions"
},
"declarations": [
{
"fileName": "Breadcrumb/src/Item.tsx",
"name": "ItemOptions"
}
],
"required": false,
"type": {
"name": "string"
}
}
}
}
}
16 changes: 16 additions & 0 deletions packages/ButtonGroup/docs/examples/overload.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Button } from '@welcome-ui/button'
import { ButtonGroup } from '@welcome-ui/button-group'
import * as React from 'react'

const Example = () => {
return (
<ButtonGroup size="sm" variant="tertiary">
<Button>First</Button>
<Button variant="secondary">Second</Button>
<Button variant="tertiary">Third</Button>
<Button variant="ghost">Last</Button>
</ButtonGroup>
)
}

export default Example
16 changes: 16 additions & 0 deletions packages/ButtonGroup/docs/examples/overview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Button } from '@welcome-ui/button'
import { ButtonGroup } from '@welcome-ui/button-group'
import * as React from 'react'

const Example = () => {
return (
<ButtonGroup>
<Button>First</Button>
<Button>Second</Button>
<Button>Third</Button>
<Button>Last</Button>
</ButtonGroup>
)
}

export default Example
13 changes: 13 additions & 0 deletions packages/ButtonGroup/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
category: forms
description: The Button Group component arranges multiple buttons in a horizontal or vertical stack, allowing users to group related actions together. It provides a cohesive and organized way to present multiple buttons, ensuring consistent spacing and alignment.
packageName: button-group
title: ButtonGroup
usage: import { ButtonGroup } from @welcome-ui/button-group
---

### Overload

`ButtonGroup` overloads the child components properties.

<div data-playground="overload.tsx" data-component="ButtonGroup"></div>
Loading

0 comments on commit 72d8ff2

Please sign in to comment.