From 29e9a980f9066acd35bdbf93d56f1007221cbc8f Mon Sep 17 00:00:00 2001 From: chenwl Date: Wed, 10 Aug 2016 10:42:24 +0800 Subject: [PATCH] Add additional class names for tab panel --- lib/react-simpletabs.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/react-simpletabs.jsx b/lib/react-simpletabs.jsx index 6370286..7b5a9aa 100644 --- a/lib/react-simpletabs.jsx +++ b/lib/react-simpletabs.jsx @@ -89,9 +89,11 @@ var Tabs = React.createClass({ .map(($panel, index) => { var ref = `tab-menu-${index + 1}`; var title = $panel.props.title; + var className = $panel.props.className; var classes = classNames( 'tabs-menu-item', - this.state.tabActive === (index + 1) && 'is-active' + this.state.tabActive === (index + 1) && 'is-active', + className ); return ( @@ -124,6 +126,11 @@ var Tabs = React.createClass({ Tabs.Panel = React.createClass({ displayName: 'Panel', propTypes: { + className: React.PropTypes.oneOfType([ + React.PropTypes.array, + React.PropTypes.string, + React.PropTypes.object + ]), title: React.PropTypes.string.isRequired, children: React.PropTypes.oneOfType([ React.PropTypes.array,