tabs: transform to Component for consistency

This commit is contained in:
Guillermo Rauch 2016-07-08 17:33:39 -07:00
parent 64a94788ef
commit 412717ce0e

View file

@ -1,7 +1,18 @@
import React from 'react'; import React from 'react';
import classes from 'classnames'; import classes from 'classnames';
export default function ({ data = [], borderColor, active, activeMarkers = [], onChange, onClose }) { export default class Tabs extends React.Component {
render () {
const {
data = [],
borderColor,
active,
activeMarkers = [],
onChange,
onClose
} = this.props;
return <nav style={{ WebkitAppRegion: 'drag' }}>{ return <nav style={{ WebkitAppRegion: 'drag' }}>{
data.length data.length
? 1 === data.length ? 1 === data.length
@ -30,6 +41,8 @@ export default function ({ data = [], borderColor, active, activeMarkers = [], o
</ul> </ul>
: null : null
}</nav>; }</nav>;
}
} }
function onClick (i, onChange, active) { function onClick (i, onChange, active) {