X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fsparky-fe.git;a=blobdiff_plain;f=src%2Fgeneric-components%2Fgraph%2FSVGShape.jsx;h=8b3359836450158ed88786d8f5513bfebd4d9731;hp=0ee31fdc0c06f11cac9d5ff83e65228dccbf1fc8;hb=b2c7546f9027099161aeaf5791f1d0f3a52b92d2;hpb=47b85e9b95e0a0a3570f0cea4d3ee4645c911a8b diff --git a/src/generic-components/graph/SVGShape.jsx b/src/generic-components/graph/SVGShape.jsx index 0ee31fd..8b33598 100644 --- a/src/generic-components/graph/SVGShape.jsx +++ b/src/generic-components/graph/SVGShape.jsx @@ -19,42 +19,43 @@ * ============LICENSE_END========================================================= */ import React, {Component} from 'react'; +import { PropTypes } from 'prop-types'; import NodeVisualElementConstants from './NodeVisualElementConstants'; class SVGShape extends Component { - - static propTypes = { - shapeType: React.PropTypes.string.isRequired, - shapeAttributes: React.PropTypes.object.isRequired, - shapeClass: React.PropTypes.object.isRequired, - textValue: React.PropTypes.string - }; - - static defaultProps = { - shapeType: '', - shapeAttributes: {}, - shapeClass: {}, - textValue: '' - }; - - render() { - let {shapeType, shapeAttributes, shapeClass, textValue} = this.props; - - switch (shapeType) { - case NodeVisualElementConstants.SVG_CIRCLE: - return ; - - case NodeVisualElementConstants.SVG_LINELINE: - return ; - - case NodeVisualElementConstants.TEXT: - return {textValue}; - - default: - return undefined; - } - } + + static propTypes = { + shapeType: PropTypes.string.isRequired, + shapeAttributes: PropTypes.object.isRequired, + shapeClass: PropTypes.object.isRequired, + textValue: PropTypes.string + }; + + static defaultProps = { + shapeType: '', + shapeAttributes: {}, + shapeClass: {}, + textValue: '' + }; + + render() { + let {shapeType, shapeAttributes, shapeClass, textValue} = this.props; + + switch (shapeType) { + case NodeVisualElementConstants.SVG_CIRCLE: + return ; + + case NodeVisualElementConstants.SVG_LINELINE: + return ; + + case NodeVisualElementConstants.TEXT: + return {textValue}; + + default: + return undefined; + } + } } export default SVGShape;