Skip to content

Commit

Permalink
docs(docs): primitives props documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusps committed Apr 15, 2024
1 parent efcc3b7 commit ecf5c61
Show file tree
Hide file tree
Showing 46 changed files with 223 additions and 299 deletions.
8 changes: 2 additions & 6 deletions packages/docs/pages/components/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,18 @@
"textarea": "Textarea",
"toast-stack": "ToastStack",
"tooltip": "Tooltip",

"Primitives": { "type": "separator", "title": "Primitives" },
"accessible-icon": "AccessibleIcon",
"clickable": "Clickable",
"combobox-input": "ComboboxInput",
"combobox-item": "ComboboxItem",
"combobox-list": "ComboboxList",
"combobox-popover": "ComboboxPopover",
"composable": "Composable",
"combobox": "Combobox",
"compose": "Compose",
"locale-provider": "LocaleProvider",
"visually-hidden": "VisuallyHidden",

"Layout": { "type": "separator", "title": "Layout" },
"bleed": "Bleed",
"center": "Center",
"container": "Container",
"content": "Content",
"flex": "Flex",
"grid": "Grid",
Expand Down
8 changes: 6 additions & 2 deletions packages/docs/pages/components/center.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Center

Center is a layout component that centers its child within itself.
<ComponentDescription name="center" />

![Center example](public/assets/overview-center.webp)
<Preview name="center" />

## Optional props

<PropsDocs name="center" />
1 change: 0 additions & 1 deletion packages/docs/pages/components/center/_meta.json

This file was deleted.

11 changes: 0 additions & 11 deletions packages/docs/pages/components/center/api-reference.mdx

This file was deleted.

13 changes: 10 additions & 3 deletions packages/docs/pages/components/checkbox.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Checkbox

A single Checkbox represents binary choices, such as accepting terms and conditions or activating and deactivating notifications.
<ComponentDescription name="checkbox" />

![Checkbox example](public/assets/overview-checkbox.webp)
## Required props

<PropsDocs name="checkbox" required />

## Optional props

<PropsDocs name="checkbox" />

## Related components

### Related components
<RelatedComponentList>
<RelatedComponent
title="RadioGroup"
Expand Down
12 changes: 10 additions & 2 deletions packages/docs/pages/components/clickable.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Clickable

Represents clickable surfaces.
<ComponentDescription name="clickable" />

![Clickable example](public/assets/overview-clickable.webp)
```jsx
<Clickable>
Text <button>Click Me</button>
</Clickable>
```

## Optional props

<PropsDocs name="clickable" />
2 changes: 1 addition & 1 deletion packages/docs/pages/components/clickable/_meta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "api-reference": "API Reference", "clickable-bubble": "ClickableBubble" }
{ "clickable-bubble": "ClickableBubble" }
25 changes: 0 additions & 25 deletions packages/docs/pages/components/clickable/api-reference.mdx

This file was deleted.

14 changes: 12 additions & 2 deletions packages/docs/pages/components/clickable/clickable-bubble.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# ClickableBubble

Bubbles events to Clickable.
<ComponentDescription name="clickable-bubble" />

![No-visual component](public/assets/no-visual-component.webp)
```jsx
<Clickable>
<ClickableBubble>
<p>Clicking the text will bubble the Click event to Clickable</p>
</ClickableBubble>
</Clickable>
```

## Required props

<PropsDocs name="clickable-bubble" required />

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions packages/docs/pages/components/combobox-input.mdx

This file was deleted.

1 change: 0 additions & 1 deletion packages/docs/pages/components/combobox-input/_meta.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/docs/pages/components/combobox-input/api-reference.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/docs/pages/components/combobox-item.mdx

This file was deleted.

1 change: 0 additions & 1 deletion packages/docs/pages/components/combobox-item/_meta.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/docs/pages/components/combobox-item/api-reference.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/docs/pages/components/combobox-list.mdx

This file was deleted.

1 change: 0 additions & 1 deletion packages/docs/pages/components/combobox-list/_meta.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/docs/pages/components/combobox-list/api-reference.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/docs/pages/components/combobox-popover.mdx

This file was deleted.

1 change: 0 additions & 1 deletion packages/docs/pages/components/combobox-popover/_meta.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/docs/pages/components/combobox-popover/api-reference.mdx

This file was deleted.

6 changes: 6 additions & 0 deletions packages/docs/pages/components/combobox/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"combobox-input": "ComboboxInput",
"combobox-item": "ComboboxItem",
"combobox-list": "ComboboxList",
"combobox-popover": "ComboboxPopover"
}
7 changes: 7 additions & 0 deletions packages/docs/pages/components/combobox/combobox-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ComboboxInput

<ComponentDescription name="combobox-input" />

## Optional props

<PropsDocs name="combobox-input" />
7 changes: 7 additions & 0 deletions packages/docs/pages/components/combobox/combobox-item.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ComboboxItem

<ComponentDescription name="combobox-item" />

## Optional props

<PropsDocs name="combobox-item" />
7 changes: 7 additions & 0 deletions packages/docs/pages/components/combobox/combobox-list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ComboboxList

<ComponentDescription name="combobox-list" />

## Optional props

<PropsDocs name="combobox-list" />
7 changes: 7 additions & 0 deletions packages/docs/pages/components/combobox/combobox-popover.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ComboboxPopover

<ComponentDescription name="combobox-popover" />

## Optional props

<PropsDocs name="combobox-popover" />
5 changes: 0 additions & 5 deletions packages/docs/pages/components/composable.mdx

This file was deleted.

1 change: 0 additions & 1 deletion packages/docs/pages/components/composable/_meta.json

This file was deleted.

30 changes: 0 additions & 30 deletions packages/docs/pages/components/composable/api-reference.mdx

This file was deleted.

14 changes: 11 additions & 3 deletions packages/docs/pages/components/compose.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Compose

Composes immediate child with its props and child own props.
Used to implement Shoreline composition.
<ComponentDescription name="compose" />

![Compose example](public/assets/overview-compose.webp)
```jsx
function Button({ asChild, ...props }) {
const Composition = asChild ? Compose : "button";
return <Composition {...props} />;
}
```

## Optional props

<PropsDocs name="compose" />
1 change: 0 additions & 1 deletion packages/docs/pages/components/compose/_meta.json

This file was deleted.

Loading

0 comments on commit ecf5c61

Please sign in to comment.