From 1582a4975782cae70b60be0d2807e73c0a4244b9 Mon Sep 17 00:00:00 2001 From: Kiryanick Date: Thu, 12 Dec 2024 11:43:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../csasq/beeapp/ui/components/UserButton.kt | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 composeApp/src/commonMain/kotlin/ru/csasq/beeapp/ui/components/UserButton.kt diff --git a/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/ui/components/UserButton.kt b/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/ui/components/UserButton.kt new file mode 100644 index 0000000..2f5beb6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/ui/components/UserButton.kt @@ -0,0 +1,44 @@ +package ru.csasq.beeapp.ui.components + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +@Composable +fun UserButton( + title: String, + caption: String, + onClick: (() -> Unit), +) { + Column( + modifier = Modifier + .fillMaxWidth() + .clickable( + onClick = onClick, + ) + .padding( + horizontal = 16.dp, + vertical = 16.dp, + ), + ) { + Text( + text = title, + style = MaterialTheme.typography.titleLarge, + ) + Spacer( + modifier = Modifier.height(4.dp), + ) + Text( + text = caption, + style = MaterialTheme.typography.bodyMedium, + ) + } +} \ No newline at end of file