From 1e3464cb706cd78f336e4a537941a33dbc94b854 Mon Sep 17 00:00:00 2001 From: ParkJong-Hun Date: Sun, 11 Aug 2024 15:16:41 +0900 Subject: [PATCH] feat: create [TimetableTime] --- .../sessions/component/TimetableTime.kt | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/component/TimetableTime.kt diff --git a/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/component/TimetableTime.kt b/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/component/TimetableTime.kt new file mode 100644 index 000000000..2ad2f37ec --- /dev/null +++ b/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/component/TimetableTime.kt @@ -0,0 +1,46 @@ +package io.github.droidkaigi.confsched.sessions.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.width +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +@Composable +fun TimetableTime( + startTime: String, + endTime: String, + modifier: Modifier = Modifier, +) { + Column( + modifier = modifier, + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(4.dp), + ) { + Text( + text = startTime, + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier, + ) + Box( + modifier = Modifier + .background(MaterialTheme.colorScheme.outline) + .width(2.dp) + .height(8.dp), + ) + Text( + text = endTime, + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier, + ) + } +}