Skip to content

Commit

Permalink
Docs(web-react): Add missing info in READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Sep 1, 2023
1 parent 439654f commit f1882dc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/web-react/src/components/Accordion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ import { AccordionOpenStateType } from '@lmc-eu/spirit-web-react/types';
| Name | Type | Default | Required | Description |
| ------------------ | --------------- | ------- | -------- | ------------------------ |
| `children` | `ReactNode` ||| Header children node |
| `elementType` | `ElementType` | `h3` || Type of element |
| `slot` | `ReactNode` ||| Side slot in the header |
| `UNSAFE_className` | `string` ||| Header custom class name |
| `UNSAFE_style` | `CSSProperties` ||| Header custom style |
Expand Down
1 change: 1 addition & 0 deletions packages/web-react/src/components/Breadcrumbs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Use custom content for ordered list as component's children instead of passing b
| Name | Type | Default | Required | Description |
| ------------------ | ------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children` | `ReactNode` ||| Custom content to override items rendering from array |
| `elementType` | `ElementType` | `nav` || Type of element used as wrapper |
| `goBackTitle` | `string` ||| Title/translation for back link to previous page on mobile. It's essential to be set along with items. If items property is not passed, backlink is to be created within children property. |
| `items` | `BreadcrumbsItem[]` ||| Navigation menu items |
| `UNSAFE_className` | `string` ||| Wrapper custom class name |
Expand Down
19 changes: 10 additions & 9 deletions packages/web-react/src/components/Collapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,16 @@ import { Button, UncontrolledCollapse } from '@lmc-eu/spirit-web-react/component

## API

| Name | Type | Default | Required | Description |
| ------------------------- | -------------------------------------------- | ---------- | -------- | -------------------------------------- |
| `collapsibleToBreakpoint` | [`mobile` \| `tablet` \| `desktop`] ||| Handle for responsive breakpoint |
| `id` | `string` | `<random>` || Component id |
| `isOpen` | `bool` ||| Is open on initialization |
| `hideOnCollapse` | `bool` ||| Hides button when content is displayed |
| `renderTrigger` | `(render: CollapseRenderProps) => ReactNode` ||| Properties for trigger render |
| `UNSAFE_className` | `string` ||| Wrapper custom classname |
| `UNSAFE_style` | `CSSProperties` ||| Wrapper custom style |
| Name | Type | Default | Required | Description |
| ------------------------- | -------------------------------------------- | ---------- | -------- | ------------------------------------------- |
| `collapsibleToBreakpoint` | [`mobile` \| `tablet` \| `desktop`] ||| Handle for responsive breakpoint |
| `elementType` | [`span` \| `div`] | `div` || Type of element used as wrapper and content |
| `id` | `string` | `<random>` || Component id |
| `isOpen` | `bool` ||| Is open on initialization |
| `hideOnCollapse` | `bool` ||| Hides button when content is displayed |
| `renderTrigger` | `(render: CollapseRenderProps) => ReactNode` ||| Properties for trigger render |
| `UNSAFE_className` | `string` ||| Wrapper custom classname |
| `UNSAFE_style` | `CSSProperties` ||| Wrapper custom style |

## Render Toggle API

Expand Down
2 changes: 1 addition & 1 deletion packages/web-react/src/types/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type BreadcrumbsItem = {

export interface AriaBreadcrumbsElementTypeProps<T extends ElementType = 'nav'> {
/**
* The HTML element or React element used to render the alert, e.g. 'div', 'span'.
* The HTML element or React element used to render the breadcrumbs, e.g. 'div', 'span'.
*
* @default 'nav'
*/
Expand Down

0 comments on commit f1882dc

Please sign in to comment.