Theme is now passed on to tab subcomponents

old
Ron Derksen 2016-08-23 14:47:35 +02:00
parent 672429f806
commit b220c70729
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,7 @@ const factory = (Tab, TabContent) => {
return headers.map((item, idx) => {
return React.cloneElement(item, {
key: idx,
theme: this.props.theme,
active: this.props.index === idx,
onClick: this.handleHeaderClick.bind(this, idx, item)
});
@ -95,6 +96,7 @@ const factory = (Tab, TabContent) => {
if (contents && contents[activeIdx]) {
return React.cloneElement(contents[activeIdx], {
key: activeIdx,
theme: this.props.theme,
active: true,
tabIndex: activeIdx
});