Allow disabling animated bottom border on tabs
parent
752f2cb7fd
commit
a2543d4a11
|
@ -7,6 +7,7 @@ class Tabs extends React.Component {
|
|||
static propTypes = {
|
||||
children: React.PropTypes.node,
|
||||
className: React.PropTypes.string,
|
||||
disableAnimatedBottomBorder: React.PropTypes.bool,
|
||||
index: React.PropTypes.number,
|
||||
onChange: React.PropTypes.func
|
||||
};
|
||||
|
@ -20,11 +21,13 @@ class Tabs extends React.Component {
|
|||
};
|
||||
|
||||
componentDidMount () {
|
||||
this.updatePointer(this.props.index);
|
||||
!this.props.disableAnimatedBottomBorder &&
|
||||
this.updatePointer(this.props.index);
|
||||
}
|
||||
|
||||
componentWillReceiveProps (nextProps) {
|
||||
this.updatePointer(nextProps.index);
|
||||
!this.props.disableAnimatedBottomBorder &&
|
||||
this.updatePointer(nextProps.index);
|
||||
}
|
||||
|
||||
handleHeaderClick = (idx) => {
|
||||
|
|
|
@ -39,9 +39,10 @@ This component acts as the wrapper and the main controller of the content that i
|
|||
|
||||
| Name | Type | Default | Description|
|
||||
|:-----|:-----|:-----|:-----|
|
||||
| `className` | `String` | `''` | Additional class name to provide custom styling.|
|
||||
| `index` | `Number` | `0` | Current <Tab> |
|
||||
| `onChange` | `Function` | | Callback function that is fired when the tab changes.
|
||||
| `className` | `String` | `''` | Additional class name to provide custom styling.|
|
||||
| `index` | `Number` | `0` | Current <Tab> |
|
||||
| `onChange` | `Function` | | Callback function that is fired when the tab changes.|
|
||||
| `disableAnimatedBottomBorder` | `Boolean` | `false` | Disable the animation below the active tab
|
||||
|
||||
## Tab
|
||||
|
||||
|
|
Loading…
Reference in New Issue