chore(tui): format dialog files with prettier (#55531)

This commit is contained in:
James Long
2026-10-15 13:12:22 -04:00
committed by GitHub
Unverified
parent 1d07373cae
commit 6c706f2021
+34 -34
View File
@@ -48,42 +48,42 @@ export function Dialog(
return (
<ThemeContextProvider context="dialog">
<box
onMouseDown={() => {
dismiss = !!renderer.getSelection()
}}
onMouseUp={() => {
if (dismiss) {
dismiss = false
return
}
props.onClose?.()
}}
width={dimensions().width}
height={dimensions().height}
alignItems="center"
justifyContent={props.centered ? "center" : undefined}
position="absolute"
zIndex={3000}
paddingTop={props.centered ? 0 : dimensions().height / 4}
left={0}
top={0}
backgroundColor={RGBA.fromInts(0, 0, 0, 150)}
>
<box
onMouseUp={(e: { stopPropagation(): void }) => {
// A selection release must bubble up to the copy-on-select handler in
// DialogProvider; the backdrop's dismiss flag keeps it from closing the dialog.
if (renderer.getSelection()?.getSelectedText()) return
dismiss = false
e.stopPropagation()
onMouseDown={() => {
dismiss = !!renderer.getSelection()
}}
width={dialogWidth(props.size ?? "medium")}
maxWidth={dimensions().width - 2}
backgroundColor={theme.background.base}
paddingTop={1}
onMouseUp={() => {
if (dismiss) {
dismiss = false
return
}
props.onClose?.()
}}
width={dimensions().width}
height={dimensions().height}
alignItems="center"
justifyContent={props.centered ? "center" : undefined}
position="absolute"
zIndex={3000}
paddingTop={props.centered ? 0 : dimensions().height / 4}
left={0}
top={0}
backgroundColor={RGBA.fromInts(0, 0, 0, 150)}
>
{props.children}
</box>
<box
onMouseUp={(e: { stopPropagation(): void }) => {
// A selection release must bubble up to the copy-on-select handler in
// DialogProvider; the backdrop's dismiss flag keeps it from closing the dialog.
if (renderer.getSelection()?.getSelectedText()) return
dismiss = false
e.stopPropagation()
}}
width={dialogWidth(props.size ?? "medium")}
maxWidth={dimensions().width - 2}
backgroundColor={theme.background.base}
paddingTop={1}
>
{props.children}
</box>
</box>
</ThemeContextProvider>
)