UNPKG

@atlaskit/editor-plugin-mentions

Version:

Mentions plugin for @atlaskit/editor-core

30 lines (29 loc) 1.12 kB
import React from 'react'; import type { PropsWithChildren } from 'react'; import type { PopperChildrenProps } from '@atlaskit/popper'; interface Props { /** * Returns the element to be positioned. */ children: React.ReactNode; /** * Replacement reference element to position popper relative to. */ referenceElement: HTMLElement; } export declare const RepositionOnUpdate: ({ children, update, }: PropsWithChildren<{ update: PopperChildrenProps["update"]; }>) => React.ReactNode; /** * A popup wrapper to match the behaviour of `@atlaskit/popup` * * Why not `@atlaskit/popup` directly? It requires a trigger element. * We can use this when we have a direct reference to the element * and it is more convenient to work directly with the lower level API. * * @param referenceElement HTMLElement - Replacement reference element to position popper relative to. * @param children React.ReactNode - Returns the element to be positioned. * @returns React popper component */ export declare function Popup({ referenceElement, children }: Props): React.JSX.Element; export {};