mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
24 lines
559 B
JavaScript
24 lines
559 B
JavaScript
import React from "react";
|
|
import { requireNativeComponent } from "react-native";
|
|
import extractClipPath from "../lib/extract/extractClipPath";
|
|
import Shape from "./Shape";
|
|
|
|
export default class ClipPath extends Shape {
|
|
static displayName = "ClipPath";
|
|
|
|
render() {
|
|
const { id, children } = this.props;
|
|
return (
|
|
<RNSVGClipPath
|
|
ref={this.refMethod}
|
|
name={id}
|
|
{...extractClipPath(this.props)}
|
|
>
|
|
{children}
|
|
</RNSVGClipPath>
|
|
);
|
|
}
|
|
}
|
|
|
|
const RNSVGClipPath = requireNativeComponent("RNSVGClipPath");
|