From 0ccb9223f60e4667f4ae88d7977befc94905fad4 Mon Sep 17 00:00:00 2001 From: Dan Wood Date: Tue, 28 Dec 2021 14:39:49 +1000 Subject: [PATCH] Export usePopper options type --- typings/react-popper.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/typings/react-popper.d.ts b/typings/react-popper.d.ts index 34d8f82..846fd62 100644 --- a/typings/react-popper.d.ts +++ b/typings/react-popper.d.ts @@ -69,13 +69,15 @@ export class Popper extends React.Component< {} > {} +export type UsePopperOptions = Omit, 'modifiers'> & { + createPopper?: typeof PopperJS.createPopper; + modifiers?: ReadonlyArray>; +} + export function usePopper( referenceElement?: Element | PopperJS.VirtualElement | null, popperElement?: HTMLElement | null, - options?: Omit, 'modifiers'> & { - createPopper?: typeof PopperJS.createPopper; - modifiers?: ReadonlyArray>; - } + options?: UsePopperOptions ): { styles: { [key: string]: React.CSSProperties }; attributes: { [key: string]: { [key: string]: string } | undefined };