You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,27 @@ React Canvas provides a set of standard React components that abstract the under
38
38
39
39
**Image** is exactly what you think it is. However, it adds the ability to hide an image until it is fully loaded and optionally fade it in on load.
40
40
41
+
### <Gradient>
42
+
43
+
**Gradient** can be used to set the background of a group or surface.
44
+
```javascript
45
+
render() {
46
+
...
47
+
return (
48
+
<Group style={this.getStyle()}>
49
+
<Gradient style={this.getGradientStyle()}
50
+
colorStops={this.getGradientColors()} />
51
+
</Group>
52
+
);
53
+
}
54
+
getGradientColors(){
55
+
return [
56
+
{ color:"transparent", position:0 },
57
+
{ color:"#000", position:1 }
58
+
]
59
+
}
60
+
```
61
+
41
62
### <ListView>
42
63
43
64
**ListView** is a touch scrolling container that renders a list of elements in a column. Think of it like UITableView for the web. It leverages many of the same optimizations that make table views on iOS and list views on Android fast.
0 commit comments