Skip to content

Global UI Api

get message(): AntdMessage

Gimkit’s message object

https://ant.design/components/message#api

AntdMessage


get modal(): AntdModal

Gimkit’s modal object

https://ant.design/components/modal#modalmethod

AntdModal


get notification(): AntdNotification

Gimkit’s notification object, only available when joining or playing a game

https://ant.design/components/notification#api

AntdNotification

addStyles(id, style): () => void

Adds a style to the DOM

ParameterType
idstring
stylestring

Function

A function to remove the styles

void


removeStyles(id): void

Remove all styles with a given id

ParameterType
idstring

void


showModal(element, options): void

Shows a customizable modal to the user

ParameterType
elementHTMLElement | ReactElement<any, string | JSXElementConstructor<any>>
options{ buttons: ModalButton[]; className: string; closeOnBackgroundClick: boolean; id: string; onClosed: () => void; style: string; title: string; }
options.buttons?ModalButton[]
options.className?string
options.closeOnBackgroundClick?boolean
options.id?string
options.onClosed?() => void
options.style?string
options.title?string

void