mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-19 13:35:11 +00:00
Refactor reuse elements
Refactor reuse elements
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user