/**
 * Created by baoyinghai on 12/27/16.
 */
import React from 'react';
import { Button, Icon } from '../index';

export default class Search extends React.Component {

  render() {
    const { dataSource, advancedSearch } = this.props;
    if (dataSource && dataSource.length > 0) {
      return (
        <div className="mx-advance-search align-self-start">
          <div className="mx-advance-search-basic">
            <div
              className="mx-advance-search-basic-switch"
              onClick={this.props.updateAdvancedSearch}
            >
              <span>{advancedSearch ? ' 收回 ' : '高级搜索'}</span>
              <span className={advancedSearch ? 'down-arrow' : 'arrow'} />
            </div>
          </div>
        </div>
      );
    }
    return null;
  }
}
