mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-01-20 20:49:39 +00:00
use es6 imports
This commit is contained in:
parent
8e09380f81
commit
6b4b1854e0
@ -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:
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user