import React from 'react'; import PropTypes from 'prop-types'; import styles from './Option.css'; import cn from 'classnames'; class Option extends React.Component { ref = null; handleRef = ref => { this.ref = ref; }; focus = () => { this.ref.focus(); }; hasFocus = () => document.activeElement === this.ref; render() { const { className, label = '', onClick, onKeyDown } = this.props; const id = this.props.id ? this.props.id : this.props.value; return (