From 3ceeeabf0b41b25778cf4c0dd208379667964685 Mon Sep 17 00:00:00 2001 From: Cutiful <113351087+Syaroful@users.noreply.github.com> Date: Thu, 10 Jul 2025 18:18:22 +0700 Subject: [PATCH] feat: add custom button component --- .../core/component/CustomButton.kt | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 agrilinkvocpro/growth_recipe_feature/src/main/java/com/syaroful/agrilinkvocpro/growth_recipe_feature/core/component/CustomButton.kt diff --git a/agrilinkvocpro/growth_recipe_feature/src/main/java/com/syaroful/agrilinkvocpro/growth_recipe_feature/core/component/CustomButton.kt b/agrilinkvocpro/growth_recipe_feature/src/main/java/com/syaroful/agrilinkvocpro/growth_recipe_feature/core/component/CustomButton.kt new file mode 100644 index 0000000..527dad8 --- /dev/null +++ b/agrilinkvocpro/growth_recipe_feature/src/main/java/com/syaroful/agrilinkvocpro/growth_recipe_feature/core/component/CustomButton.kt @@ -0,0 +1,30 @@ +package com.syaroful.agrilinkvocpro.growth_recipe_feature.core.component + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import com.syaroful.agrilinkvocpro.presentation.theme.MainGreen + + +@Composable +fun CustomButton(onClick: () -> Unit, title: String){ + Button( + modifier = Modifier.fillMaxWidth(), + onClick = onClick, + colors = ButtonDefaults.buttonColors( + containerColor = Color.Transparent, + contentColor = MainGreen + ), + shape = RoundedCornerShape(8.dp), + border = BorderStroke(color = MainGreen, width = 1.dp) + ) { + Text(title) + } +} \ No newline at end of file