Add todolist

This commit is contained in:
Horcrux
2016-04-24 10:59:33 +08:00
parent 5c31c538d6
commit f887fc66ff
6 changed files with 54 additions and 9 deletions

View File

@@ -563,6 +563,8 @@ npm install
5. fix propTypes
6. more Text features support
7. support percent props
8. Pattern element
9. Image element
#### Thanks:

25
elements/Image.js Normal file
View 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;

View File

@@ -1,7 +1,6 @@
import React, {
Component,
PropTypes,
ReactNativeBaseComponent
PropTypes
} from 'react-native';
import Path from './Path';

26
elements/Pattern.js Normal file
View 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;

View File

@@ -21,7 +21,6 @@ class SymbolElement extends Component{
{...props}
viewbox={props.viewbox}
preserveAspectRatio={props.preserveAspectRatio}
shouldTransform={true}
>
{props.children}
</ViewBox>

View File

@@ -7,12 +7,6 @@ import G from './G';
import extractViewbox from '../lib/extract/extractViewbox';
class ViewBox extends Component{
static displayName = 'ViewBox';
static propType = {
shouldTransform: PropTypes.bool
};
static defaultProps = {
shouldTransform: false
};
render() {
let viewbox = extractViewbox(this.props);