'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TabContainer = exports.TabTitle = undefined;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

require('./index.less');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * Created by baoyinghai on 6/28/17.
 */
var TabTitle = exports.TabTitle = function TabTitle(props) {
  return _react2.default.createElement(
    'span',
    { className: 'tab-title', onClick: props.onClick },
    props.children
  );
};

var TabContainer = exports.TabContainer = function TabContainer(props) {
  var currentPageIndex = props.currentPageIndex,
      pageIndex = props.pageIndex;

  var style = {
    display: currentPageIndex === pageIndex ? 'block' : 'none'
  };
  return _react2.default.createElement(
    'div',
    { style: style },
    props.children
  );
};