fix scrollpanel group

This commit is contained in:
Beebles
2025-09-26 16:08:09 -06:00
parent e2f36091e2
commit 8bb4ff7118
@@ -200,10 +200,12 @@ function AnnouncementModal({
} }
`} `}
</style> </style>
<Focusable style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem', height: '80vh' }}>
<h1>{announcement.title}</h1>
<ScrollPanelGroup <ScrollPanelGroup
// @ts-ignore // @ts-ignore
focusable={true} focusable={true}
style={{ height: '80vh' }} style={{ flex: 1, height: '100%' }}
// onCancelButton doesn't work here // onCancelButton doesn't work here
onCancelActionDescription="Back" onCancelActionDescription="Back"
onButtonDown={(evt: any) => { onButtonDown={(evt: any) => {
@@ -213,7 +215,6 @@ function AnnouncementModal({
} }
}} }}
> >
<h1>{announcement.title}</h1>
<WithSuspense> <WithSuspense>
<MarkdownRenderer <MarkdownRenderer
onDismiss={() => { onDismiss={() => {
@@ -224,11 +225,12 @@ function AnnouncementModal({
{announcement.text} {announcement.text}
</MarkdownRenderer> </MarkdownRenderer>
</WithSuspense> </WithSuspense>
</ScrollPanelGroup>
<Focusable style={{ display: 'flex', gap: '0.5rem' }}> <Focusable style={{ display: 'flex', gap: '0.5rem' }}>
<DialogButton onClick={() => onHide()}>Close Popup</DialogButton> <DialogButton onClick={() => onHide()}>Close Popup</DialogButton>
<DialogButton onClick={() => onHide()}>Close and Hide Announcement</DialogButton> <DialogButton onClick={() => onHide()}>Close and Hide Announcement</DialogButton>
</Focusable> </Focusable>
</ScrollPanelGroup> </Focusable>
</ModalRoot> </ModalRoot>
); );
} }