Skip to content

Commit

Permalink
fix(UX-1298): ZetaDialog button overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 6, 2024
1 parent d579fec commit bd05892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/src/components/buttons/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions lib/src/components/dialog/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bd05892

Please sign in to comment.