Skip to content

Commit

Permalink
fix(auto-gen-crumbs): add class name and update README for title (#39)
Browse files Browse the repository at this point in the history
* fix: add missing className to title

* fix: corrected wording of title
  • Loading branch information
loke-dev authored and sbardian committed Dec 4, 2019
1 parent caa4be3 commit 7643c71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ you to customize those breadcrumbs if you wish.
| ----------------- | ------ | ----------------------------------------------- | --------------------------------------------------------------- | -------- | ---------------------- |
| location | object | Reach Router location prop | See Reach Router location prop, passed by Gatsby to every page. | required | |
| crumbLabel | string | Name for the breadcrumb | `"About Us"` | required | |
| title | string | Title proceeding the breadcrumbs | `"Breadcrumbs: "`, `">>>"` | optional | |
| title | string | Title preceding the breadcrumbs | `"Breadcrumbs: "`, `">>>"` | optional | |
| crumbSeparator | string | Separator between each breadcrumb | `" / "` | optional | |
| crumbWrapperStyle | object | CSS object applied to breadcrumb wrapper | `{ border: '1px solid white' }` | optional | x |
| crumbStyle | object | CSS object applied to the current crumb | `{ color: 'orange' }` | optional | x |
Expand Down Expand Up @@ -427,7 +427,7 @@ of to individual crumbs, as with Click Tracking.
| prop | type | description | examples | required | useClassNames disables |
| ----------------- | ------ | --------------------------------------------- | ------------------------------- | -------- | ---------------------- |
| crumbs | array | Array of crumbs return from pageContext | n/a | required | |
| title | string | Title proceeding the breadcrumbs | `"Breadcrumbs: "`, `">>>"` | optional | |
| title | string | Title preceding the breadcrumbs | `"Breadcrumbs: "`, `">>>"` | optional | |
| crumbSeparator | string | Separator between each breadcrumb | `" / "` | optional | |
| crumbLabel | string | Override crumb label from xml path | `"About Us"` | optional | |
| crumbWrapperStyle | object | CSS object applied to breadcrumb wrapper | `{ border: '1px solid white' }` | optional | x |
Expand Down
2 changes: 1 addition & 1 deletion src/components/auto-gen-crumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const AutoGenCrumb = ({

return (
<div>
<span>{title}</span>
<span className="breadcrumb__title">{title}</span>
{autoGenCrumbs.map((c, i) => {
if (hiddenCrumbs.includes(c.pathname)) {
return null
Expand Down

0 comments on commit 7643c71

Please sign in to comment.