mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 01:00:43 +00:00
28 lines
669 B
JavaScript
28 lines
669 B
JavaScript
import React from "react";
|
|
import { requireNativeComponent } from "react-native";
|
|
import extractProps from "../lib/extract/extractProps";
|
|
import Shape from "./Shape";
|
|
|
|
export default class Path 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");
|