use es6 imports

This commit is contained in:
Dmitry Gladkov 2016-05-05 13:12:40 +03:00
parent 8e09380f81
commit 6b4b1854e0
2 changed files with 5 additions and 10 deletions

View File

@ -1,8 +1,5 @@
var React = require('react');
var { PropTypes } = React;
var ReactNative = require('react-native');
var flattenStyle = ReactNative.StyleSheet.flatten;
var { requireNativeComponent, processColor, View } = ReactNative;
import React, { PropTypes } from 'react';
import { processColor, requireNativeComponent, StyleSheet, View } from 'react-native';
var LinearGradient = React.createClass({
propTypes: {
@ -18,7 +15,7 @@ var LinearGradient = React.createClass({
// inherit container borderRadius until this issue is resolved:
// https://github.com/facebook/react-native/issues/3198
var flatStyle = style && flattenStyle(style);
var flatStyle = style && StyleSheet.flatten(style);
var borderRadius = flatStyle.borderRadius || 0;
// this is the format taken by:

View File

@ -4,10 +4,8 @@
*/
'use strict';
var React = require('react');
var { PropTypes } = React;
var ReactNative = require('react-native');
var { requireNativeComponent, processColor, View } = ReactNative;
import React, { PropTypes } from 'react';
import { processColor, requireNativeComponent, View } from 'react-native';
var LinearGradient = React.createClass({
propTypes: {