personal-website/lib/types.ts
Filipe Medeiros 9a9638237f
feat: initial commit
Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
2023-12-03 12:25:52 +01:00

18 lines
402 B
TypeScript

import { Props } from '@headlessui/react/dist/types'
import { MouseEventHandler, MutableRefObject } from 'react'
export type MouseEvent<T> = Parameters<MouseEventHandler<T>>[0]
export type PopoverProps = Props<
'div',
{
open: boolean
close(
focusableElement?:
| HTMLElement
| MutableRefObject<HTMLElement | null>
| MouseEvent<HTMLElement>,
): void
}
>