import * as React from 'react'; import { PureComponent } from 'react'; export interface ISelectOptionProps { prefixCls?: string; cid?: string; value?: any; text?: React.ReactNode; placeholder?: string; className?: string; onMouseEnter?: React.MouseEventHandler; onClick?: (evt: React.MouseEvent, cid: string) => void; } class Option extends PureComponent { constructor(props: ISelectOptionProps) { super(props); this.optionClickHandler = this.optionClickHandler.bind(this); } optionClickHandler(ev: React.MouseEvent) { this.props.onClick?.(ev, this.props.cid); } render() { const { className, text } = this.props; return ( {text} ); } } export default Option;