mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
Add G element
Add G element
This commit is contained in:
@@ -42,7 +42,7 @@ class FourSidePolygon extends Component{
|
||||
}
|
||||
}
|
||||
|
||||
class StrarPolygon extends Component{
|
||||
class StarPolygon extends Component{
|
||||
static title = 'Use the <Polygon /> element to create a star';
|
||||
render() {
|
||||
return <Svg
|
||||
@@ -61,6 +61,26 @@ class StrarPolygon extends Component{
|
||||
}
|
||||
}
|
||||
|
||||
class EvenOddPolygon extends Component{
|
||||
static title = 'Change the fill-rule property to "evenodd"';
|
||||
render() {
|
||||
return <Svg
|
||||
height="105"
|
||||
width="105"
|
||||
>
|
||||
<Group scale="0.5">
|
||||
<Polygon
|
||||
points="100,10 40,198 190,78 10,78 160,198"
|
||||
fill="lime"
|
||||
stroke="purple"
|
||||
strokeWidth="5"
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Group>
|
||||
</Svg>;
|
||||
}
|
||||
}
|
||||
|
||||
const icon = <Svg
|
||||
height="20"
|
||||
width="20"
|
||||
@@ -75,7 +95,7 @@ const icon = <Svg
|
||||
</Group>
|
||||
</Svg>;
|
||||
|
||||
const samples = [PolygonExample, FourSidePolygon, StrarPolygon];
|
||||
const samples = [PolygonExample, FourSidePolygon, StarPolygon, EvenOddPolygon];
|
||||
|
||||
export {
|
||||
icon,
|
||||
|
||||
Reference in New Issue
Block a user