File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed
apps/example/src/Examples/API Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change 88 useWindowDimensions ,
99 ScrollView ,
1010} from "react-native" ;
11+ import Svg , { Circle , Rect } from "react-native-svg" ;
1112import type { SkImage } from "@shopify/react-native-skia" ;
1213import {
1314 Canvas ,
@@ -54,7 +55,7 @@ export const Snapshot = () => {
5455
5556 return (
5657 < View style = { { flex : 1 } } >
57- < View ref = { viewRef } style = { styles . view } >
58+ < View ref = { viewRef } style = { styles . view } collapsable = { false } >
5859 < Component />
5960 </ View >
6061 < Button title = "Take snapshot" onPress = { takeSnapshot } />
@@ -114,23 +115,11 @@ const Component = () => {
114115 </ View >
115116 < Text > Hello World!</ Text >
116117 < View style = { { flexDirection : "row" } } >
117- < View
118- style = { {
119- width : 80 ,
120- height : 80 ,
121- backgroundColor : "blue" ,
122- opacity : 0.5 ,
123- } }
124- >
125- < View
126- style = { {
127- width : 40 ,
128- height : 40 ,
129- backgroundColor : "green" ,
130- opacity : 0.5 ,
131- } }
132- />
133- </ View >
118+ < Svg width = { 80 } height = { 80 } viewBox = "0 0 80 80" >
119+ < Rect x = { 0 } y = { 0 } width = { 80 } height = { 80 } fill = "blue" opacity = { 0.5 } />
120+ < Circle cx = { 40 } cy = { 40 } r = { 25 } fill = "green" opacity = { 0.7 } />
121+ < Rect x = { 30 } y = { 30 } width = { 20 } height = { 20 } fill = "red" opacity = { 0.5 } />
122+ </ Svg >
134123 < View
135124 style = { {
136125 width : 40 ,
You can’t perform that action at this time.
0 commit comments