mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-21 02:27:15 +08:00
Rearrange the benchmark code so that each implementation is self-contained. Adds the SierpinskiTriangle case that 'emotion' introduced in their fork of the 'react-native-web' benchmarks. And make it possible to run benchmarks on a per-library basis.
32 lines
629 B
JavaScript
32 lines
629 B
JavaScript
/* eslint-disable react/prop-types */
|
|
import Radium from 'radium';
|
|
import React from 'react';
|
|
|
|
class View extends React.Component {
|
|
render() {
|
|
const { style, ...other } = this.props;
|
|
return <div {...other} style={[styles.root, style]} />;
|
|
}
|
|
}
|
|
|
|
const styles = {
|
|
root: {
|
|
alignItems: 'stretch',
|
|
borderWidth: 0,
|
|
borderStyle: 'solid',
|
|
boxSizing: 'border-box',
|
|
display: 'flex',
|
|
flexBasis: 'auto',
|
|
flexDirection: 'column',
|
|
flexShrink: 0,
|
|
margin: 0,
|
|
padding: 0,
|
|
position: 'relative',
|
|
// fix flexbox bugs
|
|
minHeight: 0,
|
|
minWidth: 0
|
|
}
|
|
};
|
|
|
|
export default Radium(View);
|