Skip to content

Commit

Permalink
docs(Breadcrumbs): add readme (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feverqwe authored Sep 12, 2023
1 parent f3943c9 commit f69af39
Show file tree
Hide file tree
Showing 2 changed files with 373 additions and 18 deletions.
43 changes: 43 additions & 0 deletions src/components/Breadcrumbs/README.OLD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Breadcrumbs

Breadcrumbs component. Can collapse breadcrumbs that cause overflow.

### PropTypes

| Name | Type | Required | Default | Description |
| :----------------------- | :--------- | :------: | :------ | :--------------------------------------------------------------------------------------------------------------------------- |
| items | `Array` || | Breadcrumb items array `BreadcrumbsItem[]` |
| className | `String` | | | CSS class name of root element |
| renderRootContent | `Function` | | | Custom render function of first item `(item: BreadcrumbsItem, isCurrent: boolean) => React.ReactNode;`) |
| renderItemContent | `Function` | | | Custom render function of N+1 item `(item: BreadcrumbsItem, isCurrent: boolean, isPrevCurrent: boolean) => React.ReactNode;` |
| renderItemDivider | `Function` | | | Custom render function of items separator `() => React.ReactNode;` |
| lastDisplayedItemsCount | `Enum` || | Number of items to display after items collapse control: `LastDisplayedItemsCount` |
| firstDisplayedItemsCount | `Enum` || | Number of items to display before items collapse control: `FirstDisplayedItemsCount` |
| popupStyle | `String` | | | Style of collapsed items popup `staircase` |

### Examples

```jsx
const breadcrumbs = [
{
title: 'What is love',
},
{
title: "Baby don't hurt me",
},
{
title: "Don't hurt me",
},
{
title: 'No more',
},
];

return (
<Breadcrumbs
items={items}
lastDisplayedItemsCount={LastDisplayedItemsCount.One}
firstDisplayedItemsCount={FirstDisplayedItemsCount.One}
/>
);
```
Loading

0 comments on commit f69af39

Please sign in to comment.