12.11
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.CornerSize
|
||||
import androidx.compose.foundation.shape.CutCornerShape
|
||||
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.graphics.RectangleShape
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.navigation.NavController
|
||||
|
||||
@Composable
|
||||
fun ButtonNice(text: String, color: Color, route: String, navController: NavController){
|
||||
Button(
|
||||
onClick = { navController.navigate(route) },
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
border = BorderStroke(1.dp, Color.Black),
|
||||
shape = RoundedCornerShape(corner = CornerSize(5.dp)),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = color,
|
||||
)
|
||||
) {
|
||||
Text(text, fontSize = 20.sp, color = Color.Black)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user