WingBlank 两翼留白
WingBlank 是 Flex 布局的控件之一。代码演示
<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 = React.createClass({
render() {
return (
<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 |