PageHeaderLayout.js 568 Bytes
Newer Older
1
import React from 'react';
偏右's avatar
偏右 committed
2
import { Link } from 'dva/router';
3
import PageHeader from '../components/PageHeader';
jim's avatar
jim committed
4
import GridContent from './GridContent';
afc163's avatar
afc163 committed
5
import styles from './PageHeaderLayout.less';
6

nikogu's avatar
nikogu committed
7
export default ({ children, wrapperClassName, top, ...restProps }) => (
afc163's avatar
afc163 committed
8
  <div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}>
nikogu's avatar
nikogu committed
9
    {top}
nikogu's avatar
nikogu committed
10
    <PageHeader key="pageheader" {...restProps} linkElement={Link} />
jim's avatar
jim committed
11 12 13 14 15
    {children ? (
      <div className={styles.content}>
        <GridContent>{children}</GridContent>
      </div>
    ) : null}
16 17
  </div>
);