Skip to content

Commit 16d2d63

Browse files
authored
Merge pull request maslianok#46 from janaborchardt-twt/master
allow to pass a translation component with proptype node on to show m…
2 parents 5633370 + 8a71994 commit 16d2d63

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ render(<App />, document.getElementById('root'));
8383
| onChange | Function | onChange callback | undefined |
8484
| selectedTabKey | Number/String | Selected tab | undefined |
8585
| showMore | Bool | Whether to show `Show more` or not | `true` |
86-
| showMoreLabel | String | `Show more` tab name | `...` |
86+
| showMoreLabel | String/Node | `Show more` tab name | `...` |
8787
| transform | Bool | Transform to accordion when the wrapper width is less than `transformWidth`. | `true` |
8888
| transformWidth | Number | Transform width. | 800 |
8989
| tabsWrapperClass | String | Wrapper class | undefined |

src/components/ShowMore.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ ShowMore.propTypes = {
115115
hasChildSelected: PropTypes.bool,
116116
isShown: PropTypes.bool.isRequired,
117117
onShowMoreChanged: PropTypes.func,
118-
label: PropTypes.string
118+
label: PropTypes.oneOfType([
119+
PropTypes.string,
120+
PropTypes.node,
121+
]),
119122
};
120123

121124
ShowMore.defaultProps = {

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,10 @@ Tabs.propTypes = {
374374
tabClass: PropTypes.string,
375375
panelClass: PropTypes.string,
376376
// labels
377-
showMoreLabel: PropTypes.string
377+
showMoreLabel: PropTypes.oneOfType([
378+
PropTypes.string,
379+
PropTypes.node,
380+
]),
378381
};
379382

380383
Tabs.defaultProps = {

0 commit comments

Comments
 (0)