index.js 1013 Bytes
Newer Older
jim's avatar
jim committed
1
import React, { PureComponent } from 'react';
zinkey's avatar
zinkey committed
2
import Link from 'umi/link';
jim's avatar
jim committed
3
import RightContent from '../GlobalHeader/RightContent';
Erwin Zhang's avatar
Erwin Zhang committed
4
import BaseMenu from '../SiderMenu/BaseMenu';
jim's avatar
jim committed
5 6 7 8
import styles from './index.less';

export default class TopNavHeader extends PureComponent {
  render() {
陈帅's avatar
陈帅 committed
9
    const { theme, grid, logo } = this.props;
jim's avatar
jim committed
10
    return (
陈帅's avatar
陈帅 committed
11 12
      <div className={`${styles.head} ${theme === 'light' ? styles.light : ''}`}>
        <div className={`${styles.main} ${grid === 'Wide' ? styles.wide : ''}`}>
jim's avatar
jim committed
13
          <div className={styles.left}>
14
            <div className={styles.logo} key="logo" id="logo">
jim's avatar
jim committed
15
              <Link to="/">
陈帅's avatar
陈帅 committed
16
                <img src={logo} alt="logo" />
jim's avatar
jim committed
17 18 19
                <h1>Ant Design Pro</h1>
              </Link>
            </div>
qixian.cs@outlook.com's avatar
qixian.cs@outlook.com committed
20
            <BaseMenu {...this.props} style={{ paddingTop: '9px', border: 'none' }} />
jim's avatar
jim committed
21 22 23
          </div>
          <div className={styles.right}>
            <RightContent {...this.props} />
jim's avatar
jim committed
24 25 26 27 28 29
          </div>
        </div>
      </div>
    );
  }
}