UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

35 lines (33 loc) 996 B
import React, { PureComponent } from 'react' import { Row, Col } from 'antd' import classnames from 'classnames' import renderOperation from '../common/render-operation' import './index.scss' export default class extends PureComponent { render () { const { className, style, title, operation, children, operationItemLength, } = this.props return ( <div className={classnames('parkball-container', className)} style={style}> { (title || operation) && <Row className="parkball-container-header"> <Col span={10} className="parkball-container-title">{title}</Col> <Col span={14} className="parkball-container-operation"> <div className="pull-right">{renderOperation(operation, operationItemLength)}</div> </Col> </Row> } <Row className="parkball-container-content"> {children} </Row> </div> ) } }