UNPKG

wix-style-react

Version:
76 lines (72 loc) 1.83 kB
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; import React from 'react'; import { Layout, Cell } from 'wix-style-react/Layout'; import Text from 'wix-style-react/Text'; export default (function () { return React.createElement( 'div', null, '<Layout>', React.createElement( Layout, null, React.createElement( Cell, null, text('<Cell>Header</Cell>') ), React.createElement( Cell, null, '<Layout>', React.createElement( Layout, null, React.createElement( Cell, { span: 1 }, text('<Cell span={1}><div style={width: 400}>Left width=400</div></Cell>', { width: 400 }) ), React.createElement( Cell, { span: 10 }, text('<Cell span={10}>Middle fluid width</Cell>') ), React.createElement( Cell, { span: 1 }, text('<Cell span={1}><div style={width: 300}>Right</div></Cell>', { width: 300 }) ) ), '</Layout>' ), React.createElement( Cell, null, text('<Cell>Footer</Cell>') ) ), '</Layout>' ); }); function text(children, style) { return React.createElement( 'div', { style: _extends({ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100px', background: '#F0F4F7' }, style) }, React.createElement( Text, null, children ) ); }