Files
react-native-svg/elements/Path.js
T
Mikael Sand c7ed29b33a Simplify id/url regex matching. Allow mask/clipPath without url prefix.
Remove redundant variables.
Unify use of newlines.
2019-01-08 22:53:03 +02:00

28 lines
664 B
JavaScript

import React from "react";
import { requireNativeComponent } from "react-native";
import extractProps from "../lib/extract/extractProps";
import Shape from "./Shape";
export default class extends Shape {
static displayName = "Path";
setNativeProps = (...args) => {
this.root.setNativeProps(...args);
};
render() {
const { props } = this;
return (
<RNSVGPath
ref={ele => {
this.root = ele;
}}
{...extractProps(props, this)}
d={props.d}
/>
);
}
}
const RNSVGPath = requireNativeComponent("RNSVGPath");