WingBlank 两翼留白
布局控件代码演示
<WingBlank size='md'>…</WingBlank>
import { WingBlank, WhiteSpace } from 'antd-mobile';
const PlaceHolder = ({ className = '', ...restProps }) => (
<div className={`${className} placeholder`} {...restProps}>Block</div>
);
const WingBlankExample = () => (
<div style={{ padding: '15px 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);
.placeholder {
background-color: #ebebef;
color: #bbb;
text-align: center;
height: 30px;
line-height: 30px;
width: 100%;
}
API
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
size | 两翼留白的间距,可选sm ,md ,lg | string | lg |