diff --git a/.eslintrc b/.eslintrc index 6f9f9cd8..34a4aabb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -149,7 +149,9 @@ "no-undefined": [0], "no-underscore-dangle": [0], "no-unreachable": [2], - "no-unused-expressions": [2], + "no-unused-expressions": [2, { + "allowShortCircuit": true + }], "no-unused-vars": [1, { "vars": "all", "args": "after-used" diff --git a/components/tabs/Tabs.jsx b/components/tabs/Tabs.jsx index 1a95c411..561f4a89 100644 --- a/components/tabs/Tabs.jsx +++ b/components/tabs/Tabs.jsx @@ -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); } componentWillUnmount () { diff --git a/components/tabs/readme.md b/components/tabs/readme.md index 5f1506b4..d3b7995b 100644 --- a/components/tabs/readme.md +++ b/components/tabs/readme.md @@ -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 | -| `onChange` | `Function` | | Callback function that is fired when the tab changes. +| `className` | `String` | `''` | Additional class name to provide custom styling.| +| `index` | `Number` | `0` | Current | +| `onChange` | `Function` | | Callback function that is fired when the tab changes.| +| `disableAnimatedBottomBorder` | `Boolean` | `false` | Disable the animation below the active tab ## Tab