Merge pull request #386 from sosaucily/add_activeClassName_to_tab
add activeClassName to tab componentold
commit
688f3944d4
|
@ -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 (
|
||||
|
|
|
@ -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. |
|
||||
|
|
Loading…
Reference in New Issue