showReactCard Method

Show a Card containing React-based content, a title and a toolbar at a particular location.

showReactCard(content: ReactNode, title: undefined | string | PropertyRecord, toolbarProps: undefined | AbstractToolbarProps, location: Readonly<WritableXAndY>, offset: Readonly<WritableXAndY>, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean

Parameter Type Description
content ReactNode The React node of the content to display
title undefined | string | PropertyRecord Title to display at the top of the card.
toolbarProps undefined | AbstractToolbarProps Properties of the Toolbar to display.
location Readonly<WritableXAndY> Location of the Card, relative to the origin of htmlElement or the window.
offset Readonly<WritableXAndY> Offset of the Card from the location.
onItemExecuted OnItemExecutedFunc Function invoked after a Toolbar item is executed
onCancel OnCancelFunc Function invoked when the Escape key is pressed or a click occurs outside the Card
relativePosition RelativePosition Position relative to the given location. Defaults to TopRight.
anchorElement HTMLElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.

Returns - boolean

true if the Card was displayed, false if the Card could not be displayed.

Defined in

Last Updated: 12 June, 2024