From ab001f19b8ac9cb26caadfffbee5c14bc338a439 Mon Sep 17 00:00:00 2001 From: jangsjw Date: Tue, 14 Jan 2025 18:42:32 +0900 Subject: [PATCH] =?UTF-8?q?[UI/#22]=20ChatScreen=20=EB=82=B4=20chatInfoSec?= =?UTF-8?q?tionSell=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/component/ChatInfoSectionSell.kt | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 app/src/main/java/com/napzak/market/presentation/chat/component/ChatInfoSectionSell.kt diff --git a/app/src/main/java/com/napzak/market/presentation/chat/component/ChatInfoSectionSell.kt b/app/src/main/java/com/napzak/market/presentation/chat/component/ChatInfoSectionSell.kt new file mode 100644 index 0000000..0831918 --- /dev/null +++ b/app/src/main/java/com/napzak/market/presentation/chat/component/ChatInfoSectionSell.kt @@ -0,0 +1,97 @@ +package com.napzak.market.presentation.chat.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +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.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Divider +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import com.napzak.market.core.designsystem.theme.NapzakMarketTheme + +@Composable +fun ChatInfoSectionSell( + title: String, + description: String, + price: String, + modifier: Modifier = Modifier, + titleColor: Color = NapzakMarketTheme.colors.purple30, +) { + Column( + modifier = modifier + .fillMaxWidth() + .background(color = NapzakMarketTheme.colors.white) + ) { + Divider( + color = NapzakMarketTheme.colors.gray100, + thickness = 1.dp + ) + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 20.dp, vertical = 14.dp) + ) { + Box( + modifier = Modifier + .size(50.dp) + .background( + NapzakMarketTheme.colors.gray300, + shape = RoundedCornerShape(4.dp) + ), + contentAlignment = Alignment.Center + ) { + Text( + text = "", + color = NapzakMarketTheme.colors.gray500 + ) + } + + Spacer(modifier = Modifier.width(14.dp)) + + Column( + modifier = Modifier.weight(1f) + ) { + Row(verticalAlignment = Alignment.CenterVertically) { + Text( + text = title, + color = titleColor, + style = NapzakMarketTheme.typography.bodyBold14, + ) + + Spacer(modifier = Modifier.width(5.dp)) + + Text( + text = description, + color = NapzakMarketTheme.colors.gray900, + style = NapzakMarketTheme.typography.bodyMedium14, + ) + } + + Spacer(modifier = Modifier.height(4.dp)) + + Text( + text = price, + color = NapzakMarketTheme.colors.gray900, + style = NapzakMarketTheme.typography.bodyBold16, + ) + } + } + + Divider( + color = NapzakMarketTheme.colors.gray100, + thickness = 1.dp + ) + } +} \ No newline at end of file