mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 06:15:15 +00:00
Implement support for em in dx and dy attributes and font props for G element
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user