Add Example to draw a pie by stroke with circle

This commit is contained in:
Horcrux
2016-08-06 09:45:47 +08:00
parent 72ca2cc573
commit 9cd092c918

View File

@@ -63,6 +63,34 @@ class StrokeOpacityCircle extends Component{
} }
} }
class PieCircle extends Component{
static title = 'Draw a Pie shape with ';
render() {
return <Svg
height="100"
width="100"
>
<Circle
cx="50"
cy="50"
r="40"
fill="#ddd"
/>
<Circle
origin="50, 50"
rotate="-90"
cx="50"
cy="50"
r="20"
stroke="#0074d9"
strokeWidth="40"
fill="none"
strokeDasharray="80, 160"
/>
</Svg>;
}
}
const icon = <Svg const icon = <Svg
height="20" height="20"
width="20" width="20"
@@ -77,7 +105,12 @@ const icon = <Svg
/> />
</Svg>; </Svg>;
const samples = [CircleExample, StrokeCircle, StrokeOpacityCircle]; const samples = [
CircleExample,
StrokeCircle,
StrokeOpacityCircle,
PieCircle
];
export { export {
icon, icon,
samples samples