edit width & rebuild

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-09-03 20:46:48 +02:00
parent 1c1d8ead1f
commit 080ed34fe4
7 changed files with 13 additions and 9 deletions
+3 -1
View File
@@ -19,6 +19,8 @@ export function Modal(props: ModalProps) {
const screenCap = () => Math.max(5, dimensions().height - 4);
const maxPanelHeight = () => Math.min(props.maxHeight ?? screenCap(), screenCap());
const maxContentHeight = () => Math.max(1, maxPanelHeight() - 4);
const maxPanelWidth = () => Math.max(10, dimensions().width - 4);
const panelWidth = () => Math.min(props.width ?? 50, maxPanelWidth());
return (
<Portal>
@@ -36,7 +38,7 @@ export function Modal(props: ModalProps) {
onMouseDown={theme.mouse ? props.onDismiss : undefined}
>
<box
width={props.width ?? 50}
width={panelWidth()}
maxHeight={maxPanelHeight()}
border
borderStyle={theme.borderStyle}