From 0f7cfab7f90c8d3c88c1fa2d221fa5f917931989 Mon Sep 17 00:00:00 2001 From: Eric Fields Date: Wed, 15 Apr 2015 15:04:24 -0400 Subject: [PATCH 1/2] added support for optional custom class names --- lib/components/{Tab.js => Tab.jsx} | 6 ++++++ lib/components/TabList.js | 14 ------------- lib/components/TabList.jsx | 21 ++++++++++++++++++++ lib/components/{TabPanel.js => TabPanel.jsx} | 6 ++++++ lib/components/{Tabs.js => Tabs.jsx} | 7 ++++++- package.json | 4 +--- 6 files changed, 40 insertions(+), 18 deletions(-) rename lib/components/{Tab.js => Tab.jsx} (84%) delete mode 100644 lib/components/TabList.js create mode 100644 lib/components/TabList.jsx rename lib/components/{TabPanel.js => TabPanel.jsx} (74%) rename lib/components/{Tabs.js => Tabs.jsx} (96%) diff --git a/lib/components/Tab.js b/lib/components/Tab.jsx similarity index 84% rename from lib/components/Tab.js rename to lib/components/Tab.jsx index 4ac3afb762..9a18cfb66c 100644 --- a/lib/components/Tab.js +++ b/lib/components/Tab.jsx @@ -1,5 +1,6 @@ /** @jsx React.DOM */ var React = require('react'); +var classNames = require('classnames'); function syncNodeAttributes(node, props) { if (props.selected) { @@ -34,10 +35,15 @@ module.exports = React.createClass({ syncNodeAttributes(this.getDOMNode(), this.props); }, + getClassNames: function() { + this.props.classNames ? classNames(this.props.classNames) : false + }, + render: function () { return ( );