Skip to content

Commit

Permalink
Merge pull request #46 from janaborchardt-twt/master
Browse files Browse the repository at this point in the history
allow to pass a translation component with proptype node on to show m…
  • Loading branch information
maslianok authored Nov 13, 2018
2 parents 5633370 + 8a71994 commit 16d2d63
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ render(<App />, document.getElementById('root'));
| onChange | Function | onChange callback | undefined |
| selectedTabKey | Number/String | Selected tab | undefined |
| showMore | Bool | Whether to show `Show more` or not | `true` |
| showMoreLabel | String | `Show more` tab name | `...` |
| showMoreLabel | String/Node | `Show more` tab name | `...` |
| transform | Bool | Transform to accordion when the wrapper width is less than `transformWidth`. | `true` |
| transformWidth | Number | Transform width. | 800 |
| tabsWrapperClass | String | Wrapper class | undefined |
Expand Down
5 changes: 4 additions & 1 deletion src/components/ShowMore.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ ShowMore.propTypes = {
hasChildSelected: PropTypes.bool,
isShown: PropTypes.bool.isRequired,
onShowMoreChanged: PropTypes.func,
label: PropTypes.string
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node,
]),
};

ShowMore.defaultProps = {
Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,10 @@ Tabs.propTypes = {
tabClass: PropTypes.string,
panelClass: PropTypes.string,
// labels
showMoreLabel: PropTypes.string
showMoreLabel: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node,
]),
};

Tabs.defaultProps = {
Expand Down

0 comments on commit 16d2d63

Please sign in to comment.