WhiteSpace 上下留白

WhiteSpace 是 Flex 布局的控件之一。

代码演示

基本

上下留白 <WhiteSpace size='md' />
  1. import { WhiteSpace, WingBlank, Button } from 'antd-mobile';const WhiteSpaceExample = React.createClass({ render() { return ( <div className="button-container"> <WhiteSpace size="xs" /> <WingBlank> <Button type="primary">上下留白xs</Button> </WingBlank> <WhiteSpace size="xs" /> <div style={{ borderTop: '1Px solid #108ee9' }} /> <WhiteSpace size="sm" /> <WingBlank> <Button type="primary">上下留白sm</Button> </WingBlank> <WhiteSpace size="sm" /> <div style={{ borderTop: '1Px solid #108ee9' }} /> <WhiteSpace /> <WingBlank> <Button type="primary">上下留白md(默认)</Button> </WingBlank> <WhiteSpace /> <div style={{ borderTop: '1Px solid #108ee9' }} /> <WhiteSpace size="lg" /> <WingBlank> <Button type="primary">上下留白lg</Button> </WingBlank> <WhiteSpace size="lg" /> <div style={{ borderTop: '1Px solid #108ee9' }} /> <WhiteSpace size="xl" /> <WingBlank> <Button type="primary">上下留白xl</Button> </WingBlank> <WhiteSpace size="xl" /> <div style={{ borderTop: '1Px solid #108ee9' }} /> </div> ); },});ReactDOM.render(<WhiteSpaceExample />, mountNode);
WhiteSpace上下留白 - 图1## API#
成员说明类型可选值默认值
size上下留白的间距stringxssmmdlgxlmd