UNPKG

972 BJavaScriptView Raw
1var __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};
10import React, { Component, } from 'react';
11import { View, } from 'react-native';
12import getFlexStyle from './util';
13const defaultProps = {
14 flex: '1 row',
15};
16export 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}
23Flex.defaultProps = defaultProps;
24//# sourceMappingURL=index.js.map
\No newline at end of file