WingBlank 两翼留白
布局控件代码演示
<WingBlank size='md'>…</WingBlank>
import { WingBlank, WhiteSpace } from 'antd-mobile';
const PlaceHolder = props => (
<div
style={{
backgroundColor: '#ebebef',
color: '#bbb',
textAlign: 'center',
height: '0.6rem',
lineHeight: '0.6rem',
width: '100%',
}}
{...props}
>Block</div>
);
const WingBlankExample = () => (
<div style={{ padding: '0.3rem 0' }}>
<WingBlank><PlaceHolder /></WingBlank>
<WhiteSpace size="lg" />
<WingBlank size="md"><PlaceHolder /></WingBlank>
<WhiteSpace size="lg" />
<WingBlank size="sm"><PlaceHolder /></WingBlank>
</div>
);
ReactDOM.render(<WingBlankExample />, mountNode);
API
适用平台:WEB、React-Native属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
size | 两翼留白的间距,可选sm ,md ,lg | string | lg |