1 | var __rest = (this && this.__rest) || function (s, e) {
|
2 | var t = {};
|
3 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4 | t[p] = s[p];
|
5 | if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
|
7 | t[p[i]] = s[p[i]];
|
8 | return t;
|
9 | };
|
10 | import React, { Component, } from 'react';
|
11 | import { View, } from 'react-native';
|
12 | import getFlexStyle from './util';
|
13 | const defaultProps = {
|
14 | flex: '1 row',
|
15 | };
|
16 | export default class Flex extends Component {
|
17 | render() {
|
18 | const _a = this.props, { children, flex, style } = _a, other = __rest(_a, ["children", "flex", "style"]);
|
19 | const flexStyle = getFlexStyle(flex);
|
20 | return (React.createElement(View, Object.assign({ style: [flexStyle, style] }, other), children));
|
21 | }
|
22 | }
|
23 | Flex.defaultProps = defaultProps;
|
24 |
|
\ | No newline at end of file |