From 88d82d8ae85340cc4c32025c478b25bb955fe8e2 Mon Sep 17 00:00:00 2001 From: ahmed-osman3 <99483750+ahmed-osman3@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:28:19 +0100 Subject: [PATCH] fix(UX-1078): fixed button group disabled color. fix(UX-1080): Add snackbar action bold text fix(UX-1081): Change snackbar action color fix(UX-977): change indicator border color --- lib/src/components/badges/indicator.dart | 1 + lib/src/components/button_group/button_group.dart | 6 +++--- lib/src/components/snack_bar/snack_bar.dart | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/src/components/badges/indicator.dart b/lib/src/components/badges/indicator.dart index 1a7116e5..93286d81 100644 --- a/lib/src/components/badges/indicator.dart +++ b/lib/src/components/badges/indicator.dart @@ -95,6 +95,7 @@ class ZetaIndicator extends StatelessWidget { width: sizePixels + ZetaSpacing.minimum, height: sizePixels + ZetaSpacing.minimum, decoration: BoxDecoration( + border: Border.all(width: ZetaSpacingBase.x0_5, color: zetaColors.borderSubtle), color: (inverse ? foregroundColor : Colors.transparent), borderRadius: ZetaRadius.full, ), diff --git a/lib/src/components/button_group/button_group.dart b/lib/src/components/button_group/button_group.dart index 94acf1fd..ec252b94 100644 --- a/lib/src/components/button_group/button_group.dart +++ b/lib/src/components/button_group/button_group.dart @@ -264,10 +264,10 @@ class _ZetaGroupButtonState extends State { if (states.contains(WidgetState.focused)) { return BorderSide(color: colors.blue.shade50, width: ZetaSpacingBase.x0_5); } - if (widget.isInverse) return BorderSide(color: colors.black); if (states.contains(WidgetState.disabled)) { return BorderSide(color: colors.cool.shade40); } + if (widget.isInverse) return BorderSide(color: colors.black); return BorderSide( color: finalButton ? colors.borderDefault : colors.borderSubtle, ); @@ -297,8 +297,6 @@ class _ZetaGroupButtonState extends State { ), ), backgroundColor: WidgetStateProperty.resolveWith((states) { - if (widget.isInverse) return colors.cool.shade100; - if (states.contains(WidgetState.disabled)) { return colors.surfaceDisabled; } @@ -308,6 +306,8 @@ class _ZetaGroupButtonState extends State { if (states.contains(WidgetState.hovered)) { return colors.cool.shade20; } + if (widget.isInverse) return colors.cool.shade100; + return colors.surfacePrimary; }), foregroundColor: WidgetStateProperty.resolveWith((states) { diff --git a/lib/src/components/snack_bar/snack_bar.dart b/lib/src/components/snack_bar/snack_bar.dart index 7b825ae1..6d132eed 100644 --- a/lib/src/components/snack_bar/snack_bar.dart +++ b/lib/src/components/snack_bar/snack_bar.dart @@ -190,7 +190,7 @@ class _Action extends StatelessWidget { ZetaSnackBarType.action => _ActionButton( onPressed: onPressed, label: actionLabel, - color: colors.blue.shade50, + color: colors.borderPrimaryMain, ), ZetaSnackBarType.positive || ZetaSnackBarType.info || @@ -294,7 +294,10 @@ class _ActionButton extends StatelessWidget { onPressed: onPressed, child: Text( label ?? '', - style: ZetaTextStyles.labelLarge.copyWith(color: color), + style: ZetaTextStyles.labelLarge.copyWith( + color: color, + fontWeight: FontWeight.bold, + ), ), ), );