import React , { ReactNode } from 'react' ; import { getChild } from '../../helpers/children' ; import { Box } from '../Box' ; export type ComboBoxProps = { children ? : ReactNode ; style ? : React . CSSProperties ; /**
     * Maps to Downshift's refKey set in getRootProps. refKey must be set to "rootRef"
     */ rootRef ? : React . MutableRefObject < HTMLDivElement > ; } ; function ComboBox ( props ) { const { children , style , rootRef , ... rest } = props ; const textfieldWithMenu = React . useMemo ( ( ) => { return getChild ( 'ComboBoxTextField' , children , { children : getChild ( 'ComboBoxMenu' , children ) , } ) ; } , [ children ] ) ; return ( < Box position = "relative" ref = { rootRef } style = { style } { ... rest } > { textfieldWithMenu } < /Box>); } export default ComboBox ;