diff --git a/src/components/Dialog/Dialog.tsx b/src/components/Dialog/Dialog.tsx index c552e47ade..9f16129a6d 100644 --- a/src/components/Dialog/Dialog.tsx +++ b/src/components/Dialog/Dialog.tsx @@ -304,6 +304,7 @@ const styles = StyleSheet.create({ width: '100%', minWidth: 280, maxWidth: 560, + maxHeight: '100%', }, titleWithIcon: { textAlign: 'center', diff --git a/src/components/Dialog/DialogActions.tsx b/src/components/Dialog/DialogActions.tsx index cae3d68f80..6623bdb92e 100644 --- a/src/components/Dialog/DialogActions.tsx +++ b/src/components/Dialog/DialogActions.tsx @@ -65,10 +65,12 @@ DialogActions.displayName = 'Dialog.Actions'; const styles = StyleSheet.create({ v3Container: { flexDirection: 'row', + flexWrap: 'wrap', flexGrow: 1, alignItems: 'center', justifyContent: 'flex-end', columnGap: 8, + rowGap: 8, paddingBottom: 24, paddingHorizontal: 24, }, diff --git a/src/components/__tests__/Dialog.test.tsx b/src/components/__tests__/Dialog.test.tsx index 92336dfafb..df8b6d04ef 100644 --- a/src/components/__tests__/Dialog.test.tsx +++ b/src/components/__tests__/Dialog.test.tsx @@ -577,6 +577,33 @@ describe('DialogActions', () => { expect(cancelButtonProps).toHaveProperty('style', styles.spacing); expect(okButtonProps).toHaveProperty('style', styles.noSpacing); }); + + it('bounds dialog height and wraps action buttons for large text sizes', async () => { + await render( + + + Disagree + , + , + ]} + /> + + ); + + const dialog = screen.getByLabelText('Dialog'); + expect(dialog).toHaveStyle({ maxHeight: '100%' }); + + expect(screen.getByText('Disagree')).toBeOnTheScreen(); + expect(screen.getByText('Agree')).toBeOnTheScreen(); + }); }); const styles = StyleSheet.create({