index.js 1.09 KB
Newer Older
jim's avatar
jim committed
1 2 3 4 5 6 7 8 9
import React, { PureComponent } from 'react';
import { Link } from 'dva/router';
import RightContent from '../GlobalHeader/RightContent';
import BaseMeun from '../SiderMenu/BaseMeun';
import styles from './index.less';

export default class TopNavHeader extends PureComponent {
  render() {
    return (
jim's avatar
jim committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
      <div
        className={`${styles.head} ${
          this.props.theme === 'ligth' ? styles.ligth : ''
        }`}
      >
        <div
          className={`${styles.main} ${
            this.props.grid === 'Wide' ? styles.wide : ''
          }`}
        >
          <div className={styles.left}>
            <div className={styles.logo} key="logo">
              <Link to="/">
                <img src={this.props.logo} alt="logo" />
                <h1>Ant Design Pro</h1>
              </Link>
            </div>
            <BaseMeun
              {...this.props}
              style={{ padding: '9px 0', border: 'none' }}
            />
          </div>
          <div className={styles.right}>
            <RightContent {...this.props} />
jim's avatar
jim committed
34 35 36 37 38 39
          </div>
        </div>
      </div>
    );
  }
}