Use buttonComponent on Detail.kt

main
CAPEL Maxime 2023-12-21 15:00:54 +01:00
parent 5a943d4d9f
commit 1938a0282f
1 changed files with 2 additions and 10 deletions

View File

@ -18,6 +18,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import main.component.buttonComponent
@Composable @Composable
fun glossaryDetailedPage(glossary: List<Word>, onBackClick: () -> Unit) { fun glossaryDetailedPage(glossary: List<Word>, onBackClick: () -> Unit) {
@ -34,16 +35,7 @@ fun glossaryDetailedPage(glossary: List<Word>, onBackClick: () -> Unit) {
Spacer(modifier = Modifier.height(16.dp)) Spacer(modifier = Modifier.height(16.dp))
Button( buttonComponent(text = "Retour", onClick = { onBackClick() })
onClick = { onBackClick() },
colors = androidx.compose.material.ButtonDefaults.buttonColors(
backgroundColor = customRedColor,
contentColor = Color.White
)
) {
Icon(imageVector = Icons.Default.ArrowBack, contentDescription = null)
Text("Retour")
}
} }
} }