Skip to content

Commit ef98927

Browse files
authored
Merge pull request #6 from matapo/changed-expo-matapo
Updated Expo import for a gradient
2 parents 704278b + ac93a0e commit ef98927

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from "react";
22
import { View, StyleSheet } from "react-native";
33
import generateGradient from "./generator";
4+
import { LinearGradient } from "expo-linear-gradient";
45

56
export { generateGradient };
67

78
export default ({ gradient, children, style }) => {
8-
const LinearGradient = require("expo").LinearGradient;
99
const generated = generateGradient(gradient, {
1010
width: style.width,
1111
height: style.height

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"peerDependencies": {
2020
"expo": "*",
21+
"expo-linear-gradient": "*",
2122
"react": "*",
2223
"react-native": "*"
2324
}

0 commit comments

Comments
 (0)