import React, { Component } from 'react'; import PropTypes from 'prop-types'; class Option extends Component { onSelectOption = (e) => { e.stopPropagation(); this.props.onSelectOption(this.props.option); }; onMouseEnter = () => { if (!this.props.disableHover) { this.props.changeIndex(this.props.index); } }; onMouseLeave = () => { if (!this.props.disableHover) { this.props.changeIndex(-1); } }; render() { return (