mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-24 04:25:27 +08:00
33 lines
700 B
JavaScript
33 lines
700 B
JavaScript
/* eslint-disable react/prop-types */
|
|
import { css } from 'glamor';
|
|
import React from 'react';
|
|
|
|
const View = props => <div {...props} className={css(viewStyle, props.style)} />;
|
|
|
|
const viewStyle = {
|
|
alignItems: 'stretch',
|
|
borderWidth: 0,
|
|
borderStyle: 'solid',
|
|
boxSizing: 'border-box',
|
|
display: 'flex',
|
|
flexBasis: 'auto',
|
|
flexDirection: 'column',
|
|
flexShrink: 0,
|
|
margin: 0,
|
|
padding: 0,
|
|
position: 'relative',
|
|
// button and anchor reset
|
|
backgroundColor: 'transparent',
|
|
color: 'inherit',
|
|
font: 'inherit',
|
|
textAlign: 'inherit',
|
|
textDecorationLine: 'none',
|
|
// list reset
|
|
listStyle: 'none',
|
|
// fix flexbox bugs
|
|
minHeight: 0,
|
|
minWidth: 0
|
|
};
|
|
|
|
module.exports = View;
|