Add Import method to usage instructions.
Use `var LinearGradient = require('react-native-linear-gradient');` as shown in the Login example app does not work.
This commit is contained in:
parent
2a9f95efa4
commit
73df1d3602
|
@ -97,6 +97,8 @@ The following code will produce something like this:
|
|||
![Example code result](https://raw.githubusercontent.com/brentvatne/react-native-linear-gradient/master/images/example.png)
|
||||
|
||||
```javascript
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
|
||||
// Within your render function
|
||||
<LinearGradient colors={['#4c669f', '#3b5998', '#192f6a']} style={styles.linearGradient}>
|
||||
<Text style={styles.buttonText}>
|
||||
|
|
Loading…
Reference in New Issue