From bd0589234bd9667442ce1b446df6eacc7dc11f58 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 6 Nov 2024 16:20:10 +0000 Subject: [PATCH] fix(UX-1298): ZetaDialog button overflow --- lib/src/components/buttons/button.dart | 9 ++++++--- lib/src/components/dialog/dialog.dart | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/src/components/buttons/button.dart b/lib/src/components/buttons/button.dart index c6e8f590..63acbfb9 100644 --- a/lib/src/components/buttons/button.dart +++ b/lib/src/components/buttons/button.dart @@ -202,9 +202,12 @@ class ZetaButton extends ZetaStatelessWidget { size: iconSize, ), if (label.isNotEmpty) - Text( - label, - style: _textStyle, + Flexible( + child: Text( + label, + style: _textStyle, + textAlign: TextAlign.center, + ).paddingVertical(Zeta.of(context).spacing.minimum), ), if (trailingIcon != null) Icon( diff --git a/lib/src/components/dialog/dialog.dart b/lib/src/components/dialog/dialog.dart index fb051c06..e5ac4f5e 100644 --- a/lib/src/components/dialog/dialog.dart +++ b/lib/src/components/dialog/dialog.dart @@ -106,6 +106,10 @@ class _ZetaDialog extends ZetaStatelessWidget { rounded: context.rounded, child: AlertDialog( surfaceTintColor: zeta.colors.surfacePrimary, + insetPadding: EdgeInsets.symmetric( + horizontal: Zeta.of(context).spacing.xl, + vertical: Zeta.of(context).spacing.xl_2, + ), shape: RoundedRectangleBorder(borderRadius: Zeta.of(context).radius.large), title: icon != null || title != null ? Column(