Skip to content

Commit

Permalink
Use token color
Browse files Browse the repository at this point in the history
  • Loading branch information
Osman authored and Osman committed Mar 6, 2024
1 parent bb4827f commit 10d0287
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/lib/pages/components/button_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class _ButtonExampleState extends State<ButtonExample> {
Column(children: inputButtons(ZetaWidgetBorder.rounded)),
Text('Sharp Buttons', style: ZetaTextStyles.displayMedium),
Column(children: inputButtons(ZetaWidgetBorder.sharp)),
Text('Icon Buttons', style: ZetaTextStyles.displayLarge),
Text('Group Buttons', style: ZetaTextStyles.displayLarge),
Column(
children: groupButtons(ZetaWidgetBorder.rounded),
),
Expand Down
7 changes: 3 additions & 4 deletions lib/src/components/buttons/button_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ZetaButtonGroup extends StatelessWidget {
{super.key,
required this.buttons,
required this.rounded,
required this.isLarge});
required this.isLarge,});

/// Determines size of [GroupButton]
final bool isLarge;
Expand Down Expand Up @@ -219,8 +219,7 @@ class _GroupButtonState extends State<GroupButton> {
}

ButtonStyle getStyle(ZetaWidgetBorder borderType, ZetaColors colors) {
final ZetaColorSwatch color =
selected ? colors.cool : ZetaColorSwatch.fromColor(colors.black);


return ButtonStyle(
shape: MaterialStateProperty.all(
Expand All @@ -247,7 +246,7 @@ class _GroupButtonState extends State<GroupButton> {
if (states.contains(MaterialState.disabled)) {
return colors.textDisabled;
}
if (selected) return color.onColor;
if (selected) return colors.black.onColor;
return colors.textDefault;
}),
elevation: const MaterialStatePropertyAll(0),
Expand Down

0 comments on commit 10d0287

Please sign in to comment.