import React, { PureComponent } from 'react'; import { connect } from 'dva'; import styles from './GridContent.less'; class GridContent extends PureComponent { render() {
const { grid, children } = this.props;
let className = `${styles.main}`;
if (grid === 'Wide') {
className = `${styles.main} ${styles.wide}`;
}
return <div className={className}>{children}</div>;
} }
export default connect(({ setting }) => ({ grid: setting.grid,
}))(GridContent);