Implement support for em in dx and dy attributes and font props for G element

This commit is contained in:
Mikael Sand
2017-06-20 03:15:01 +03:00
parent b094bc80f0
commit 155fa4b6ae
6 changed files with 117 additions and 64 deletions

View File

@@ -1,14 +1,18 @@
import React from 'react';
import createReactNativeComponentClass from 'react-native/Libraries/Renderer/src/renderers/native/createReactNativeComponentClass';
import Shape from './Shape';
import {pathProps} from '../lib/props';
import {pathProps, fontProps} from '../lib/props';
import {GroupAttributes} from '../lib/attributes';
import extractProps from '../lib/extract/extractProps';
import {extractFont} from '../lib/extract/extractText';
export default class extends Shape{
static displayName = 'G';
static propTypes = pathProps;
static propTypes = {
...pathProps,
...fontProps,
};
setNativeProps = (...args) => {
this.root.setNativeProps(...args);
@@ -19,6 +23,7 @@ export default class extends Shape{
return <RNSVGGroup
{...extractProps(props, this)}
font={extractFont(props)}
ref={ele => {this.root = ele;}}
>
{props.children}