mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-03-02 16:20:29 +00:00
Reword prop README, state View props support
This commit is contained in:
parent
50d3254495
commit
df8ce9569d
@ -127,15 +127,13 @@ var styles = StyleSheet.create({
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Additional props
|
### Additional props
|
||||||
You can also use start and end points, as well as specify the locations
|
In addition to regular `View` props, you can also provide additional props to customize your gradient look:
|
||||||
for the gradient color changes with the `start`, `end`, `colors` and `locations`
|
|
||||||
props:
|
|
||||||
|
|
||||||
#### colors
|
#### colors
|
||||||
An array of at least two color values that represent gradient steps. Example: `['red', 'blue']` sets gradient from red to blue.
|
An array of at least two color values that represent gradient colors. Example: `['red', 'blue']` sets gradient from red to blue.
|
||||||
|
|
||||||
#### start
|
#### start
|
||||||
An object of the following type: `{ x: number, y: number }`. Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. Example: `{ x: 0.1, y: 0.1 }` means that the gradient will start 10% from the top and 10% from the left.
|
An optional object of the following type: `{ x: number, y: number }`. Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. Example: `{ x: 0.1, y: 0.1 }` means that the gradient will start 10% from the top and 10% from the left.
|
||||||
|
|
||||||
#### end
|
#### end
|
||||||
Same as start, but for the end of the gradient.
|
Same as start, but for the end of the gradient.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user