Add examples and refactor code

Add examples and refactor code
This commit is contained in:
Horcrux
2016-01-21 23:44:38 +08:00
parent 89b52fd4a2
commit a482948b83
61 changed files with 3143 additions and 105 deletions

47
Example/examples/Line.js Normal file
View File

@@ -0,0 +1,47 @@
import React, {
Component
} from 'react-native';
import Svg, {
Line
} from 'react-native-art-svg';
class LineExample extends Component{
static title = 'Line';
render() {
return <Svg
height="100"
width="100"
>
<Line
x1="0"
y1="0"
x2="100"
y2="100"
stroke="red"
strokeWidth="2"
/>
</Svg>;
}
}
const icon = <Svg
height="20"
width="20"
>
<Line
x1="0"
y1="0"
x2="20"
y2="20"
stroke="red"
strokeWidth="1"
/>
</Svg>;
const samples = [LineExample];
export {
icon,
samples
}