GridContent.js 470 Bytes
Newer Older
jim's avatar
jim committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import styles from './GridContent.less';

class GridContent extends PureComponent {
  render() {
    let className = `${styles.main}`;
    if (this.props.layout === 'fluid') {
      className = `${styles.main} ${styles.fluid}`;
    }
    return <div className={className}>{this.props.children}</div>;
  }
}

export default connect(({ global }) => ({
  layout: global.layout,
}))(GridContent);