File tree Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,28 @@ React-Native text gradient component for iOS & Android.
25
25
- Android - WIP, currently only basic 'wrapper'-like behavior without nesting is supported;
26
26
- React-Native - supported version >0.50, except of 0.53.0.
27
27
28
+
29
+ ## Example
30
+
31
+ ``` javascript
32
+ import { LinearTextGradient } from ' react-native-text-gradient' ;
33
+
34
+ < LinearTextGradient
35
+ style= {{ fontWeight: ' bold' , fontSize: 72 }}
36
+ locations= {[0 , 1 ]}
37
+ colors= {[' red' , ' blue' ]}
38
+ start= {{ x: 0 , y: 0 }}
39
+ end= {{ x: 1 , y: 0 }}
40
+ >
41
+ THIS IS TEXT GRADIENT
42
+ < / LinearTextGradient>
43
+ ```
44
+
45
+ iOS | Android
46
+ :---------------------------------------------:|:---------------------------------------------:
47
+ <img src =" img/ios.png " align =" left " height =" 275 " > | <img src =" img/android.jpg " align =" right " height =" 275 " >
48
+
49
+
28
50
## Usage
29
51
30
52
### LinearTextGradient
@@ -48,27 +70,6 @@ Optional. If true gradient will be calculated for text view background frame rat
48
70
<img src =" img/useViewFrame.png " width =" 300 " >
49
71
50
72
51
- ## Example
52
-
53
- ``` javascript
54
- import { LinearTextGradient } from ' react-native-text-gradient' ;
55
-
56
- < LinearTextGradient
57
- style= {{ fontWeight: ' bold' , fontSize: 72 }}
58
- locations= {[0 , 1 ]}
59
- colors= {[' red' , ' blue' ]}
60
- start= {{ x: 0 , y: 0 }}
61
- end= {{ x: 1 , y: 0 }}
62
- >
63
- THIS IS TEXT GRADIENT
64
- < / LinearTextGradient>
65
- ```
66
-
67
- iOS | Android
68
- :---------------------------------------------:|:---------------------------------------------:
69
- <img src =" img/ios.png " align =" left " height =" 275 " > | <img src =" img/android.jpg " align =" right " height =" 275 " >
70
-
71
-
72
73
## Caveats
73
74
74
75
When mixing several text gradients and ` Text ` s top component always should be text gradient.
You can’t perform that action at this time.
0 commit comments