mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 05:55:10 +00:00
25 lines
639 B
JavaScript
25 lines
639 B
JavaScript
import React, {Component, PropTypes} from 'react';
|
|
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
|
import {ClipPathAttributes} from '../lib/attributes';
|
|
|
|
class ClipPath extends Component{
|
|
static displayName = 'ClipPath';
|
|
static propTypes = {
|
|
id: PropTypes.string.isRequired
|
|
};
|
|
|
|
render() {
|
|
return <RNSVGClipPath
|
|
name={this.props.id}
|
|
>{this.props.children}</RNSVGClipPath>;
|
|
}
|
|
}
|
|
|
|
const RNSVGClipPath = createReactNativeComponentClass({
|
|
validAttributes: ClipPathAttributes,
|
|
uiViewClassName: 'RNSVGClipPath'
|
|
});
|
|
|
|
export default ClipPath;
|
|
|