UNPKG

@uiw/react-native

Version:
36 lines (32 loc) 694 B
import React, { Component } from 'react'; import { View, StyleSheet } from 'react-native'; export default class WingBlank extends Component { static defaultProps = { size: 'default' }; render() { const { style, size, ...restProps } = this.props; let sizeStyle = {}; if (typeof size === 'number') { sizeStyle.marginHorizontal = size; } else if (size && styles[size]) { sizeStyle = styles[size]; } return <View {...restProps} style={[sizeStyle, style]} />; } } const styles = StyleSheet.create({ default: { marginHorizontal: 12 }, small: { marginHorizontal: 6 }, large: { marginHorizontal: 16 } });