comp-layout
v1.0.0
Published
basic react component
Downloads
5
Readme
comp-layout
API
| 属性 | 说明 | 类型 | 默认值 | | ---- | ---- | ---- | ---- | | Header | 头部组件 | ReactNode | | | Content | 内容主体组件 | ReactNode | | | Sidebar | 侧边栏组件 | ReactNode | | | Footer | 页尾组件 | ReactNode | |
Example
import React from 'react';
import { render } from 'react-dom';
import { Layout } from 'antd';
import CompLayout from 'comp-layout';
const { Header, Content, Sider, Footer } = Layout;
render(
<CompLayout
Header={<Header>{'头部'}</Header>}
Content={<Content>{'内容主体'}</Content>}
Sidebar={<Sider>{'侧边栏'}</Sider>}
Footer={<Footer>{'页尾'}</Footer>}
/>,
document.getElementById('app')
);
Develop
$ npm run start
Publish
$ cd ../.. // 返回项目根目录,通过 `lerna` 来构建与发布
$ npm run build
$ npm publish