mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-09 09:27:20 +00:00
1e25870f5d
Remove redundant toString calls / type transforms. The view managers handle the different types natively.
21 lines
589 B
JavaScript
21 lines
589 B
JavaScript
import React, { Component } from "react";
|
|
import PropTypes from "prop-types";
|
|
import { requireNativeComponent } from "react-native";
|
|
import { ClipPathAttributes } from "../lib/attributes";
|
|
|
|
export default class extends Component {
|
|
static displayName = "ClipPath";
|
|
static propTypes = {
|
|
id: PropTypes.string.isRequired,
|
|
};
|
|
|
|
render() {
|
|
const { id, children } = this.props;
|
|
return <RNSVGClipPath name={id}>{children}</RNSVGClipPath>;
|
|
}
|
|
}
|
|
|
|
const RNSVGClipPath = requireNativeComponent("RNSVGClipPath", null, {
|
|
nativeOnly: ClipPathAttributes,
|
|
});
|