// @flow import * as React from 'react'; import classNames from 'classnames'; import IconInfo from '../../icons/general/IconInfo'; import Tooltip from '../tooltip'; import Label from '../label'; import './Select.scss'; type Props = { /** Input ``'s */ children?: React.Node, className?: string, error?: React.Node, infoIconProps?: Object, infoTooltip?: React.Node, isDisabled?: boolean, /** Label displayed for the input */ label: React.Node, labelTooltip?: string, name: string, /** Handler for the change event on the select element */ onChange?: Function, showErrorOutline?: boolean, showLabel?: boolean, }; const Select = ({ children, className = '', error, infoTooltip, infoIconProps, isDisabled, label, name, labelTooltip, onChange, showErrorOutline = false, showLabel = true, ...rest }: Props) => { const classes = classNames(className, 'select-input-container', { 'show-error': !!error || showErrorOutline, 'is-disabled': isDisabled, }); return (