import React from 'react' import useTheme from '../use-theme' import withDefaults from '../utils/with-defaults' import { useAutoCompleteContext } from './auto-complete-context' import Dropdown from '../shared/dropdown' interface Props { visible: boolean className?: string disableMatchWidth?: boolean dropdownStyle?: Record } const defaultProps = { className: '', dropdownStyle: {} } type NativeAttrs = Omit, keyof Props> export type AutoCompleteDropdownProps = Props & typeof defaultProps & NativeAttrs const AutoCompleteDropdown: React.FC> = ({ children, visible, className, dropdownStyle, disableMatchWidth }) => { const theme = useTheme() const { ref } = useAutoCompleteContext() const clickHandler = (event: React.MouseEvent) => { event.preventDefault() event.stopPropagation() event.nativeEvent.stopImmediatePropagation() } return (
{children}
) } export default withDefaults(AutoCompleteDropdown, defaultProps)