X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fgeneric-components%2Fgraph%2FNode.jsx;h=67d954cb849172399e8c822cac8ecbe06819b4a4;hb=HEAD;hp=0b96f2a4c8f67c6a8d97dd932bd156b3bbf9d2ee;hpb=47b85e9b95e0a0a3570f0cea4d3ee4645c911a8b;p=aai%2Fsparky-fe.git diff --git a/src/generic-components/graph/Node.jsx b/src/generic-components/graph/Node.jsx index 0b96f2a..67d954c 100644 --- a/src/generic-components/graph/Node.jsx +++ b/src/generic-components/graph/Node.jsx @@ -19,35 +19,36 @@ * ============LICENSE_END========================================================= */ import React, {Component} from 'react'; +import { PropTypes } from 'prop-types'; class Node extends Component { - - static propTypes = { - x: React.PropTypes.number, - y: React.PropTypes.number, - nodeClass: React.PropTypes.string, - visualElements: React.PropTypes.array, - meta: React.PropTypes.object - }; - - static defaultProps = { - x: 0, - y: 0, - nodeClass: '', - visualElements: [], - meta: {} - }; - - render() { - let {x, y, nodeClass, visualElements} = this.props; - let translate = `translate(${x}, ${y})`; - - return ( - - {visualElements} - - ); - } + + static propTypes = { + x: PropTypes.number, + y: PropTypes.number, + nodeClass: PropTypes.string, + visualElements: PropTypes.array, + meta: PropTypes.object + }; + + static defaultProps = { + x: 0, + y: 0, + nodeClass: '', + visualElements: [], + meta: {} + }; + + render() { + let {x, y, nodeClass, visualElements} = this.props; + let translate = `translate(${x}, ${y})`; + + return ( + + {visualElements} + + ); + } } export default Node;