diff options
| author | Beebles <102569435+beebls@users.noreply.github.com> | 2025-09-26 16:08:09 -0600 |
|---|---|---|
| committer | Beebles <102569435+beebls@users.noreply.github.com> | 2025-09-26 16:08:09 -0600 |
| commit | 8bb4ff71181bfe257b2f67cbedc077ec097e93b2 (patch) | |
| tree | 5981b2f1204fbaf8253b69a09ec0d4e9dfa8316b | |
| parent | e2f36091e2619e18cbe8781053b9d3cd94904a51 (diff) | |
| download | decky-loader-8bb4ff71181bfe257b2f67cbedc077ec097e93b2.tar.gz decky-loader-8bb4ff71181bfe257b2f67cbedc077ec097e93b2.zip | |
fix scrollpanel group
| -rw-r--r-- | frontend/src/components/AnnouncementsDisplay.tsx | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/frontend/src/components/AnnouncementsDisplay.tsx b/frontend/src/components/AnnouncementsDisplay.tsx index c62a5d77..d1a0ec8c 100644 --- a/frontend/src/components/AnnouncementsDisplay.tsx +++ b/frontend/src/components/AnnouncementsDisplay.tsx @@ -200,35 +200,37 @@ function AnnouncementModal({ } `} </style> - <ScrollPanelGroup - // @ts-ignore - focusable={true} - style={{ height: '80vh' }} - // onCancelButton doesn't work here - onCancelActionDescription="Back" - onButtonDown={(evt: any) => { - if (!evt?.detail?.button) return; - if (evt.detail.button === 2) { - closeModal?.(); - } - }} - > + <Focusable style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem', height: '80vh' }}> <h1>{announcement.title}</h1> - <WithSuspense> - <MarkdownRenderer - onDismiss={() => { - console.log('Dismiss'); + <ScrollPanelGroup + // @ts-ignore + focusable={true} + style={{ flex: 1, height: '100%' }} + // onCancelButton doesn't work here + onCancelActionDescription="Back" + onButtonDown={(evt: any) => { + if (!evt?.detail?.button) return; + if (evt.detail.button === 2) { closeModal?.(); - }} - > - {announcement.text} - </MarkdownRenderer> - </WithSuspense> + } + }} + > + <WithSuspense> + <MarkdownRenderer + onDismiss={() => { + console.log('Dismiss'); + closeModal?.(); + }} + > + {announcement.text} + </MarkdownRenderer> + </WithSuspense> + </ScrollPanelGroup> <Focusable style={{ display: 'flex', gap: '0.5rem' }}> <DialogButton onClick={() => onHide()}>Close Popup</DialogButton> <DialogButton onClick={() => onHide()}>Close and Hide Announcement</DialogButton> </Focusable> - </ScrollPanelGroup> + </Focusable> </ModalRoot> ); } |
