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

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