/** * Copyright (c) Paymium. * * This source code is licensed under the MIT license found in the * LICENSE file in the root of this projects source tree. */ import { ComponentType, forwardRef } from 'react'; import { useContext } from './context'; import { composeEventHandlers } from '@crossed/core'; import { RovingFocus } from '../utils/RovingFocus'; export type DropdownItemProps = { disabled?: boolean; }; export const createDropdownItem =

>( Styled: ComponentType

) => // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore forwardRef((props, ref) => { const { setOpen } = useContext(); return ( { setOpen(false); })} /> ); });