Skip to content

Commit 08430f4

Browse files
committed
Publish react-native-css-gradient
1 parent 340ba95 commit 08430f4

14 files changed

+9321
-18
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ Carthage/Build
178178
# https://github.com/johnno1962/injectionforxcode
179179

180180
dist
181-
package-lock.json
182-
*/node_modules
181+
node_modules
183182
.idea
184183
.vscode
185184
.env*

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
example/

example/.expo/packager-info.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"devToolsPort": 19002,
3+
"expoServerPort": null,
4+
"packagerPort": null,
5+
"packagerPid": null,
6+
"expoServerNgrokUrl": null,
7+
"packagerNgrokUrl": null,
8+
"ngrokPid": null
9+
}

example/.expo/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"hostType": "lan",
3+
"lanType": "ip",
4+
"dev": true,
5+
"minify": false,
6+
"urlRandomness": "59-uv5"
7+
}

example/App.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React, { Component } from 'react';
2+
import { Text, ScrollView, View, Dimensions, StatusBar} from 'react-native';
3+
import gradients from './gradient-source';
4+
import Gradient from 'react-native-css-gradient';
5+
6+
const {width, height }= Dimensions.get('window');
7+
8+
export default class App extends Component {
9+
componentDidMount() {
10+
StatusBar.setHidden(true);
11+
}
12+
render() {
13+
return (
14+
<ScrollView>
15+
{gradients.map((g, key) => {
16+
return <Gradient
17+
key={key}
18+
gradient={g.gradient}
19+
style={{
20+
width,
21+
height,
22+
alignItems: "flex-start",
23+
justifyContent: "flex-end",
24+
padding: 20,
25+
marginBottom: 4
26+
}}
27+
>
28+
<View>
29+
<Text style={{fontSize: 46, fontWeight: "100", opacity: .8}}>{g.title}</Text>
30+
<Text style={{fontFamily: "Courier New", fontSize: 11, fontWeight: "500"}}>{g.gradient}</Text>
31+
</View>
32+
</Gradient>
33+
})}
34+
</ScrollView>
35+
36+
);
37+
}
38+
}

example/app.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"expo": {
3+
"name": "react-native-css-gradient-example",
4+
"description": "This project is really great.",
5+
"slug": "react-native-css-gradient-example",
6+
"privacy": "public",
7+
"sdkVersion": "30.0.0",
8+
"platforms": ["ios", "android"],
9+
"version": "1.0.0",
10+
"orientation": "portrait",
11+
"icon": "./assets/icon.png",
12+
"splash": {
13+
"image": "./assets/splash.png",
14+
"resizeMode": "contain",
15+
"backgroundColor": "#ffffff"
16+
},
17+
"updates": {
18+
"fallbackToCacheTimeout": 0
19+
},
20+
"assetBundlePatterns": [
21+
"**/*"
22+
],
23+
"ios": {
24+
"supportsTablet": true
25+
}
26+
}
27+
}
File renamed without changes.

example/assets/icons/loading-icon.png

-2.91 KB
Binary file not shown.

example/assets/splash.png

7.01 KB
Loading

0 commit comments

Comments
 (0)