Skip to content

Commit aba35a3

Browse files
committed
convert props description to table
1 parent 523b692 commit aba35a3

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,16 @@ ___
163163
164164
## `Breadcrumbs` component props
165165
166-
* `separator` - separator between breadcrumbs items (default: undefined)
167-
* `item` - component of breadcrumbs items (default: 'a')
168-
* `finalItem` - component of final breadcrumbs item (default: value of `item` prop)
169-
* `finalProps` - final item props which override specified in `BreadcrumbsItem` (default: {})
170-
* `container` - wrapper component (default is `span`)
171-
* `containerProps` - props for `container` components if defined (default: {})
172-
* `renameProps` - rename props passed from item intermedator to item
173-
* `duplicateProps` - duplicate same as `renameProps` but without remove original.
166+
| property | type | default | description |
167+
| -------- | ---- | ------- | ------- |
168+
| `separator` | *element* | `undefined` | separator between breadcrumbs items |
169+
| `item` | *component* | `a` | component of breadcrumbs items |
170+
| `finalItem` | *component* | value of `item` prop | component of final breadcrumbs item |
171+
| `finalProps` | *object* | `{}` | final item props - will override specified in `BreadcrumbsItem` |
172+
| `container` | *component* | `span` | wrapper component |
173+
| `containerProps` | *object* | `{}` | props for `container` component |
174+
| `renameProps` | *object* | `{}` | rename props passed from item `BreadcrumbsItem` to `item` |
175+
| `duplicateProps` | *object* | `{}` | duplicate props passed from item `BreadcrumbsItem` to `item` |
174176
175177
176178
## `BreadcrumbsItem` component props
@@ -179,21 +181,24 @@ The `BreadcrumbsItem` component may have any prop and may have children. Each pr
179181
for `BreadcrumbsItem` will be passed to correspondent breadcrumb component specified
180182
in `item` or `finalItem` prop of `Breadcrumbs`. Only one prop is mandatory.
181183
182-
* `to` - mandatory required bearing key with URL for breadcrumbs working
183-
* `...` - any more number of properties.
184+
| property | type | default | description |
185+
| -------- | ---- | ------- | ------- |
186+
| `to` | *string* | required | mandatory required bearing key with URL |
187+
| `...` | *any* | | any properties - will be mapped to correspondent breadcrumb item |
184188
189+
___
185190
186-
## `withBreadcrumbsItem()` function
191+
### `withBreadcrumbsItem()` function
187192
188-
This function creates higher order component. It acquire one argument with your
189-
custom react component and return appropriate component which will have
190-
`breadcrumbs` in its props with methods `item()` and `items()`
191-
like `throughAgent` from [react-through](https://github.com/oklas/react-through).
193+
Advanced usage higher order component function. It acquire one argument with
194+
your custom react component and return appropriate component which will have
195+
`breadcrumbs` in its props with methods `item()` and `items()` like
196+
`throughAgent` from [react-through](https://github.com/oklas/react-through).
192197
193198
194199
### `this.props.breadcrumbs.item()` and `this.props.breadcrumbs.items()`
195200
196-
Methods to configure breadcrumbs item of your current react component.
201+
Advanced usage methods to configure breadcrumbs item of your react component.
197202
These methods will be added to props by HOC of `withBreadcrumbsItem` function.
198203
The function `item()` accepts one react component with props and the functions
199204
`items()` accepts react component with children which may contain any number of
@@ -213,8 +218,10 @@ The prop name which contain bearing key is defined in
213218
`breadcrumbsBearingKey`.
214219
215220
221+
``` javascript
216222
import { breadcrumbsThroughArea } from 'react-breadcrumbs-dynamic'
217223
import { breadcrumbsBearingKey } from 'react-breadcrumbs-dynamic'
224+
```
218225
219226
220227
## LICENSE

0 commit comments

Comments
 (0)