Update README.md
added definitions for props (thanks to Exponent!)
This commit is contained in:
parent
14bf9a06a7
commit
537aa439af
16
README.md
16
README.md
|
@ -128,10 +128,22 @@ var styles = StyleSheet.create({
|
|||
```
|
||||
|
||||
### Additional props
|
||||
|
||||
You can also use start and end points, as well as specify the locations
|
||||
for the gradient color changes with the `start`, `end` and `locations`
|
||||
for the gradient color changes with the `start`, `end`, `colors` and `locations`
|
||||
props:
|
||||
#### colors
|
||||
An array of colors that represent stops in the gradient. At least two colors are required (otherwise it's not a gradient, it's just a fill!).
|
||||
|
||||
#### start
|
||||
An array of [x, y] where x and y are floats. They represent the position that the gradient starts at, as a fraction of the overall size of the gradient. For example, [0.1, 0.1] means that the gradient will start 10% from the top and 10% from the left.
|
||||
|
||||
#### end
|
||||
Same as start but for the end of the gradient.
|
||||
|
||||
#### locations
|
||||
An array of the same lenth as colors, where each element is a float with the same meaning as the start and end values, but instead they indicate where the color at that index should be.
|
||||
|
||||
|
||||
|
||||
```javascript
|
||||
<LinearGradient
|
||||
|
|
Loading…
Reference in New Issue