comp-section-layout
v1.0.2
Published
basic react component
Downloads
7
Readme
comp-section-layout
API
| 属性 | 说明 | 类型 | 默认值 | | ---- | ---- | ---- | ---- | | title | 标题 | String/RectNode | | | titleSytle | 标题自定义样式 | Object | | | contentSytle | 内容自定义样式 | Object | |
Example
import React from 'react';
import { render } from 'react-dom';
import { Form } from 'antd';
import CompSectionLayout from 'comp-section-layout';
const FormItem = Form.Item;
const formItemLayout = {
labelCol: {
span: 2
},
wrapperCol: {
span: 16
}
};
render(
<CompSectionLayout title="基本信息" titleStyle={{fontSize: '18px'}}>
<Form>
<FormItem
{...formItemLayout}
label="英文名字"
>
张三
</FormItem>
<FormItem
{...formItemLayout}
label="实际年龄"
>
28
</FormItem>
</Form>
</CompSectionLayout>,
document.getElementById('app')
);
Develop
$ npm run start
Publish
$ cd ../.. // 返回项目根目录,通过 `lerna` 来构建与发布
$ npm run build
$ npm publish