/* @flow */ 'use strict'; import * as React from 'react'; import PropTypes from 'prop-types'; export const FeeSelectValue = (props: any): any => { return (
{ props.value.value } { props.value.label }
); } type Props = { children: React.Node, className: string, isDisabled: boolean, isFocused: boolean, isSelected: boolean, onFocus: Function, onSelect: Function, option: any, } export class FeeSelectOption extends React.Component { constructor(props: Props) { super(props); } handleMouseDown(event: MouseEvent) { event.preventDefault(); event.stopPropagation(); this.props.onSelect(this.props.option, event); } handleMouseEnter(event: MouseEvent) { this.props.onFocus(this.props.option, event); } handleMouseMove(event: MouseEvent) { if (this.props.isFocused) return; this.props.onFocus(this.props.option, event); } render() { return (
{ this.props.option.value } { this.props.option.label }
); } }