MCPcopy
hub / github.com/primer/react / onClose

Function onClose

packages/react/src/ConfirmationDialog/ConfirmationDialog.tsx:159–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 if (!hostElement.isConnected) document.body.append(hostElement)
158 const root = createRoot(hostElement)
159 const onClose: ConfirmationDialogProps['onClose'] = gesture => {
160 root.unmount()
161 if (gesture === 'confirm') {
162 resolve(true)
163 } else {
164 resolve(false)
165 }
166 }
167 root.render(
168 <ThemeProvider {...themeProps}>
169 <BaseStyles>

Callers 9

SelectPanelFunction · 0.85
ConfirmationHeaderFunction · 0.85
ConfirmationDialogFunction · 0.85
CustomHeaderFunction · 0.85
DefaultHeaderFunction · 0.85
Dialog.tsxFile · 0.85
handlerFunction · 0.85
ActionMenuBaseFunction · 0.85
AnchoredOverlayFunction · 0.85

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected