diff --git a/src/main/kotlin/main/Detail.kt b/src/main/kotlin/main/Detail.kt index 873ba7b..88d9c25 100644 --- a/src/main/kotlin/main/Detail.kt +++ b/src/main/kotlin/main/Detail.kt @@ -9,7 +9,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.filled.* import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -19,7 +19,11 @@ import androidx.compose.ui.unit.dp import main.component.buttonComponent @Composable -fun glossaryDetailedPage(glossary: List, onBackClick: () -> Unit) { +fun glossaryDetailedPage( + glossary: List, + onBackClick: () -> Unit, + onAddWordClick: () -> Unit +) { Column( modifier = Modifier.fillMaxSize(), verticalArrangement = Arrangement.Top, // Align content at the top @@ -34,6 +38,7 @@ fun glossaryDetailedPage(glossary: List, onBackClick: () -> Unit) { Spacer(modifier = Modifier.height(16.dp)) buttonComponent(text = "Retour", onClick = { onBackClick() }, icon = Icons.Filled.ArrowBack, width = 150) + buttonComponent(text = "Ajouter un mot", onClick = { onAddWordClick() }, icon = Icons.Filled.Add, width = 150) } } diff --git a/src/main/kotlin/main/Main.kt b/src/main/kotlin/main/Main.kt index 51ec064..1d0ab9f 100644 --- a/src/main/kotlin/main/Main.kt +++ b/src/main/kotlin/main/Main.kt @@ -330,7 +330,8 @@ fun app() { "glossaireDetail" -> { glossaryDetailedPage( glossary = glossaryDetail, - onBackClick = { currentPage.value = "glossaireOptions" } + onBackClick = { currentPage.value = "glossaireOptions" }, + onAddWordClick = { currentPage.value = "formulaire" }, ) }