import { useRef } from 'react'; import { css } from '@patternfly/react-styles'; import styles from '../css/topology-components'; import AddCircleOIcon from '@patternfly/react-icons/dist/esm/icons/add-circle-o-icon'; import { Tooltip } from '@patternfly/react-core'; import Point from '../geom/Point'; import ConnectorArrow from './edges/terminals/ConnectorArrow'; const cursorSize = 20; interface DefaultCreateConnectorProps { startPoint: Point; endPoint: Point; hints: string[]; dragging: boolean; hover?: boolean; className?: string; tipContents?: React.ReactNode; } const DefaultCreateConnector: React.FunctionComponent = ({ startPoint, endPoint, hints, dragging, hover, tipContents, className }) => { const iconRef = useRef(null); const classes = css( styles.topologyDefaultCreateConnector, className, hover && styles.modifiers.hover, dragging && styles.modifiers.dragging ); return ( {hints && hints[hints.length - 1] === 'create' ? ( {tipContents ? ( ) : ( )} ) : ( )} ); }; export default DefaultCreateConnector;