Files
react-native-svg/elements/Symbol.js
Horcrux 7e13b801e1 refactor text render
Support G inherit props.
Refactor text render. Text glyphs will perfectly draw along the path
2016-07-22 23:49:15 +08:00

27 lines
604 B
JavaScript

import React, {Component, PropTypes} from 'react';
import ViewBox from './ViewBox';
import G from './G';
class SymbolElement extends Component{
static displayName = 'Symbol';
static propType = {
id: PropTypes.string.isRequired
};
render() {
let {props} = this;
return <G id={props.id}>
<ViewBox
{...props}
viewbox={props.viewbox}
preserveAspectRatio={props.preserveAspectRatio}
>
{props.children}
</ViewBox>
</G>;
}
}
export default SymbolElement;