Files
react-native-svg/elements/ClipPath.js
T
Mikael Sand 1e25870f5d Simplify and optimize property handling logic
Remove redundant toString calls / type transforms.
The view managers handle the different types natively.
2018-10-12 18:52:23 +03:00

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,
});