Skip to content

Instantly share code, notes, and snippets.

@augustl
Created June 3, 2014 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save augustl/374d67d56288062b9e7b to your computer and use it in GitHub Desktop.
Save augustl/374d67d56288062b9e7b to your computer and use it in GitHub Desktop.
render: function () {
var self = this;
var state = this.state;
var tabIdx = 0;
return div(
null,
ul({className: "nav nav-tabs", key: "tabs"}, state.tabs.map(function (tab) {
tabIdx = tabIdx + 1;
return Tab({
key: "tab-" + tabIdx,
tab: tab,
isActive: state.currentTab === tab,
onTabClick: self.handleTabClicked
});
}))
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment