From 696abc271d043e862a0570262050063a5eb172f1 Mon Sep 17 00:00:00 2001 From: ManonPolle <46710837+ManonPolle@users.noreply.github.com> Date: Fri, 27 Jan 2023 17:38:19 +0100 Subject: [PATCH] fix(buttons): Fix Ripple Theme on Buttons (#76) --- .../vitamin/compose/buttons/VitaminButtons.kt | 14 +++++++------- .../vitamin/compose/buttons/VitaminIconButtons.kt | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminButtons.kt b/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminButtons.kt index 62240730..9f4286ae 100644 --- a/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminButtons.kt +++ b/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminButtons.kt @@ -47,7 +47,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.primary(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.brand, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, @@ -85,7 +85,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.primaryReversed(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.brandReversed, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, @@ -124,7 +124,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.secondary(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.primary(), - ripple: RippleTheme = VitaminTheme.ripples.primary, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, @@ -163,7 +163,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.tertiary(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.tertiary, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, @@ -203,7 +203,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.ghost(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.primaryReversed, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, @@ -242,7 +242,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.ghostReversed(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.primaryReversed, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, @@ -281,7 +281,7 @@ object VitaminButtons { colors: ButtonColors = VitaminButtonsColors.conversion(), sizes: ButtonSizes = VitaminButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.accent, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminButtonImpl( text = text, diff --git a/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminIconButtons.kt b/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminIconButtons.kt index aa497378..37311a08 100644 --- a/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminIconButtons.kt +++ b/buttons/src/main/java/com/decathlon/vitamin/compose/buttons/VitaminIconButtons.kt @@ -43,7 +43,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.primary(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.brand, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier, @@ -78,7 +78,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.primaryReversed(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.brandReversed, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier, @@ -114,7 +114,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.secondary(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.primary(), - ripple: RippleTheme = VitaminTheme.ripples.primary, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier, @@ -150,7 +150,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.tertiary(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.tertiary, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier, @@ -187,7 +187,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.ghost(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.primaryReversed, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier, @@ -223,7 +223,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.ghostReversed(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.primaryReversed, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier, @@ -259,7 +259,7 @@ object VitaminIconButtons { colors: ButtonColors = VitaminButtonsColors.conversion(), sizes: IconButtonSizes = VitaminIconButtonsSizes.medium(), borders: ButtonBorders = VitaminButtonBorders.none(), - ripple: RippleTheme = VitaminTheme.ripples.accent, + ripple: RippleTheme = LocalRippleTheme.current, onClick: () -> Unit ) = VitaminIconButtonImpl( modifier = modifier,