From 52682c57745980e564703824b4fa0f30ed56e870 Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Wed, 16 Mar 2016 14:36:27 -0700 Subject: [PATCH 1/2] add activeClassName to tab component --- components/tabs/Tab.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/tabs/Tab.jsx b/components/tabs/Tab.jsx index 954d32ec..b7d8c3c3 100644 --- a/components/tabs/Tab.jsx +++ b/components/tabs/Tab.jsx @@ -5,6 +5,7 @@ import style from './style'; class TabHeader extends React.Component { static propTypes = { active: React.PropTypes.bool, + activeClassName: React.PropTypes.string, className: React.PropTypes.string, disabled: React.PropTypes.bool, hidden: React.PropTypes.bool, @@ -36,7 +37,8 @@ class TabHeader extends React.Component { const className = ClassNames(style.label, { [style.active]: this.props.active, [style.hidden]: this.props.hidden, - [style.disabled]: this.props.disabled + [style.disabled]: this.props.disabled, + [this.props.activeClassName]: this.props.active }, this.props.className); return ( From 1cda333723c56862e6b7aedb9d1971c8c4bdb51c Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Wed, 16 Mar 2016 14:59:20 -0700 Subject: [PATCH 2/2] update readme for tabs --- components/tabs/readme.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/tabs/readme.md b/components/tabs/readme.md index a93baccb..5f1506b4 100644 --- a/components/tabs/readme.md +++ b/components/tabs/readme.md @@ -49,9 +49,10 @@ Represent a single tab element and it should include some properties to describe | Name | Type | Default | Description| |:-----|:-----|:-----|:-----| -| `active` | `Boolean` | `false` | If true, the current component is visible.| -| `className` | `String` | `''` | Additional class name to provide custom styling.| -| `disabled` | `Boolean` | `false` | If true, the current component is not clickable.| -| `hidden` | `Boolean` | `false` | If true, the current component is not visible.| -| `label` | `String` | | Label text for navigation header | -| `onActive` | `Function` | | Callback function that is fired when the tab is activated. | +| `active` | `Boolean` | `false` | If true, the current component is visible.| +| `activeClassName` | `String` | `''` | Additional class name to provide custom styling for the active tab.| +| `className` | `String` | `''` | Additional class name to provide custom styling for each tab.| +| `disabled` | `Boolean` | `false` | If true, the current component is not clickable.| +| `hidden` | `Boolean` | `false` | If true, the current component is not visible.| +| `label` | `String` | | Label text for navigation header | +| `onActive` | `Function` | | Callback function that is fired when the tab is activated. |