From 1938a0282ffa30e662f56d732578b986f9908514 Mon Sep 17 00:00:00 2001 From: CAPEL Maxime <83071634+fortyup@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:00:54 +0100 Subject: [PATCH] Use buttonComponent on Detail.kt --- src/main/kotlin/main/Detail.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/main/Detail.kt b/src/main/kotlin/main/Detail.kt index 1b4d137..5bdd2d2 100644 --- a/src/main/kotlin/main/Detail.kt +++ b/src/main/kotlin/main/Detail.kt @@ -18,6 +18,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp +import main.component.buttonComponent @Composable fun glossaryDetailedPage(glossary: List, onBackClick: () -> Unit) { @@ -34,16 +35,7 @@ fun glossaryDetailedPage(glossary: List, onBackClick: () -> Unit) { Spacer(modifier = Modifier.height(16.dp)) - Button( - onClick = { onBackClick() }, - colors = androidx.compose.material.ButtonDefaults.buttonColors( - backgroundColor = customRedColor, - contentColor = Color.White - ) - ) { - Icon(imageVector = Icons.Default.ArrowBack, contentDescription = null) - Text("Retour") - } + buttonComponent(text = "Retour", onClick = { onBackClick() }) } }