Refactor reuse elements

Refactor reuse elements
This commit is contained in:
Horcrux
2016-01-25 11:39:31 +08:00
parent 5f3c2e8e39
commit e001285cbe
16 changed files with 171 additions and 101 deletions

View File

@@ -47,13 +47,35 @@ class TextRotate extends Component{
x="126"
y="24"
fill="#f60"
rotate="16"
rotate="78"
scale="1.36"
origin="20, 0"
>I love SVG</Text>
</Svg>;
}
}
class TextStroke extends Component{
static title = 'Stroke the text';
render() {
return <Svg
height="60"
width="200"
>
<Text
fill="none"
stroke="purple"
fontSize="20"
fontWeight="bold"
x="100"
y="20"
alignment="center"
>STROKED TEXT</Text>
</Svg>;
}
}
// TODO: wait for official done
class TextPath extends Component{
static title = 'Transform the text';
@@ -90,7 +112,7 @@ const icon = <Svg
></Text>
</Svg>;
const samples = [TextExample, TextRotate];
const samples = [TextExample, TextRotate, TextStroke];
export {
icon,