From 3998a69e29be9219f7d33b817a3c1a351abd3874 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Wed, 27 Nov 2024 10:17:29 +0100 Subject: [PATCH] refactor: Rename GenericButton into SwissTransferButton --- .../com/infomaniak/swisstransfer/ui/components/Buttons.kt | 2 +- .../components/{GenericButton.kt => SwissTransferButton.kt} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename app/src/main/java/com/infomaniak/swisstransfer/ui/components/{GenericButton.kt => SwissTransferButton.kt} (97%) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt index 77a5e1a06..87152627b 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt @@ -103,7 +103,7 @@ private fun CoreButton( onClick: () -> Unit, imageVector: ImageVector?, ) { - GenericButton( + SwissTransferButton( modifier.height(buttonSize.height), style, enabled, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/GenericButton.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferButton.kt similarity index 97% rename from app/src/main/java/com/infomaniak/swisstransfer/ui/components/GenericButton.kt rename to app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferButton.kt index 03ed98f31..dd9b7b6c1 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/GenericButton.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferButton.kt @@ -42,7 +42,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewLightAndDark * Specifying a progress has the priority over specifying showIndeterminateProgress. */ @Composable -fun GenericButton( +fun SwissTransferButton( modifier: Modifier = Modifier, style: ButtonType = ButtonType.PRIMARY, enabled: () -> Boolean = { true }, @@ -136,7 +136,7 @@ private fun Preview() { Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { ButtonType.entries.forEach { buttonType -> Row { - GenericButton( + SwissTransferButton( modifier = Modifier.height(40.dp), style = buttonType, onClick = {}, @@ -145,7 +145,7 @@ private fun Preview() { Spacer(modifier = Modifier.width(12.dp)) - GenericButton( + SwissTransferButton( modifier = Modifier.height(40.dp), style = buttonType, onClick = {},