mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-22 19:01:36 +00:00
@@ -23,10 +23,12 @@ class GExample extends Component{
|
||||
stroke="pink"
|
||||
strokeWidth="3"
|
||||
>
|
||||
<Circle
|
||||
cx="25"
|
||||
cy="25"
|
||||
/>
|
||||
<G>
|
||||
<Circle
|
||||
cx="25"
|
||||
cy="25"
|
||||
/>
|
||||
</G>
|
||||
<Circle
|
||||
cx="25"
|
||||
cy="75"
|
||||
|
||||
@@ -10,7 +10,8 @@ import Svg, {
|
||||
Ellipse,
|
||||
Circle,
|
||||
Text,
|
||||
Rect
|
||||
Rect,
|
||||
G
|
||||
} from 'react-native-svg';
|
||||
|
||||
class LinearGradientHorizontal extends Component{
|
||||
@@ -32,7 +33,7 @@ class LinearGradientHorizontal extends Component{
|
||||
}
|
||||
|
||||
class LinearGradientVertical extends Component{
|
||||
static title = 'Define an ellipse with a horizontal linear gradient from yellow to red';
|
||||
static title = 'Define an ellipse with a vertical linear gradient from yellow to red';
|
||||
render() {
|
||||
return <Svg
|
||||
height="150"
|
||||
@@ -44,7 +45,11 @@ class LinearGradientVertical extends Component{
|
||||
<Stop offset="100%" stopColor="red" stopOpacity="1" />
|
||||
</LinearGradient>
|
||||
</Defs>
|
||||
<Ellipse cx="150" cy="75" rx="85" ry="55" fill="url(#grad)" />
|
||||
<G>
|
||||
<G>
|
||||
<Ellipse cx="150" cy="75" rx="85" ry="55" fill="url(#grad)" />
|
||||
</G>
|
||||
</G>
|
||||
</Svg>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user