mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
Add todolist
This commit is contained in:
@@ -563,6 +563,8 @@ npm install
|
|||||||
5. fix propTypes
|
5. fix propTypes
|
||||||
6. more Text features support
|
6. more Text features support
|
||||||
7. support percent props
|
7. support percent props
|
||||||
|
8. Pattern element
|
||||||
|
9. Image element
|
||||||
|
|
||||||
|
|
||||||
#### Thanks:
|
#### Thanks:
|
||||||
|
|||||||
25
elements/Image.js
Normal file
25
elements/Image.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import React, {
|
||||||
|
Component,
|
||||||
|
PropTypes
|
||||||
|
} from 'react-native';
|
||||||
|
|
||||||
|
let propType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
||||||
|
|
||||||
|
class Image extends Component{
|
||||||
|
static displayName = 'Image';
|
||||||
|
static propTypes = {
|
||||||
|
x1: propType,
|
||||||
|
x2: propType,
|
||||||
|
y1: propType,
|
||||||
|
y2: propType,
|
||||||
|
href: PropTypes.string
|
||||||
|
//preserveAspectRatio: PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Image;
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import React, {
|
import React, {
|
||||||
Component,
|
Component,
|
||||||
PropTypes,
|
PropTypes
|
||||||
ReactNativeBaseComponent
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Path from './Path';
|
import Path from './Path';
|
||||||
|
|
||||||
|
|||||||
26
elements/Pattern.js
Normal file
26
elements/Pattern.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import React, {
|
||||||
|
Component,
|
||||||
|
PropTypes
|
||||||
|
} from 'react-native';
|
||||||
|
|
||||||
|
let propType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
||||||
|
|
||||||
|
class Image extends Component{
|
||||||
|
static displayName = 'Pattern';
|
||||||
|
static propTypes = {
|
||||||
|
x1: propType,
|
||||||
|
x2: propType,
|
||||||
|
y1: propType,
|
||||||
|
y2: propType,
|
||||||
|
patternTransform: PropTypes.string,
|
||||||
|
patternUnits: PropTypes.oneOf(['userSpaceOnUse', 'objectBoundingBox']),
|
||||||
|
patternContentUnits: PropTypes.oneOf(['userSpaceOnUse', 'objectBoundingBox'])
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Pattern;
|
||||||
@@ -21,7 +21,6 @@ class SymbolElement extends Component{
|
|||||||
{...props}
|
{...props}
|
||||||
viewbox={props.viewbox}
|
viewbox={props.viewbox}
|
||||||
preserveAspectRatio={props.preserveAspectRatio}
|
preserveAspectRatio={props.preserveAspectRatio}
|
||||||
shouldTransform={true}
|
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</ViewBox>
|
</ViewBox>
|
||||||
|
|||||||
@@ -7,12 +7,6 @@ import G from './G';
|
|||||||
import extractViewbox from '../lib/extract/extractViewbox';
|
import extractViewbox from '../lib/extract/extractViewbox';
|
||||||
class ViewBox extends Component{
|
class ViewBox extends Component{
|
||||||
static displayName = 'ViewBox';
|
static displayName = 'ViewBox';
|
||||||
static propType = {
|
|
||||||
shouldTransform: PropTypes.bool
|
|
||||||
};
|
|
||||||
static defaultProps = {
|
|
||||||
shouldTransform: false
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let viewbox = extractViewbox(this.props);
|
let viewbox = extractViewbox(this.props);
|
||||||
|
|||||||
Reference in New Issue
Block a user