From 912d01e0ecec3aa4f2e0a3468145d492e00c6901 Mon Sep 17 00:00:00 2001 From: Youngjik Yoon Date: Wed, 26 Jul 2023 21:12:05 +0900 Subject: [PATCH 1/3] =?UTF-8?q?#104=20KnightsCard=EC=9D=98=20=EB=B0=B0?= =?UTF-8?q?=EA=B2=BD=EC=83=89=EC=9D=98=20=EA=B8=B0=EB=B3=B8=20=EA=B0=92?= =?UTF-8?q?=EC=9D=84=20surface=EB=A1=9C=20=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../droidknights/app2023/core/designsystem/component/Card.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt b/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt index be606729..85b31dc7 100644 --- a/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt +++ b/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt @@ -2,6 +2,7 @@ package com.droidknights.app2023.core.designsystem.component import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -11,7 +12,7 @@ import androidx.compose.ui.unit.dp @Composable fun KnightsCard( modifier: Modifier = Modifier, - color: Color = Color(0xFFFFFFFF), + color: Color = MaterialTheme.colorScheme.surface, content: @Composable () -> Unit, ) { Surface( From cfb6b77bac630c7090348286bf991a6c24534115 Mon Sep 17 00:00:00 2001 From: Youngjik Yoon Date: Wed, 26 Jul 2023 21:12:16 +0900 Subject: [PATCH 2/3] =?UTF-8?q?#104=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C?= =?UTF-8?q?=20color=20=EC=A0=81=EC=9A=A9=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/droidknights/app2023/feature/session/SessionCard.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionCard.kt b/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionCard.kt index 9738450f..1c4b0b14 100644 --- a/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionCard.kt +++ b/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionCard.kt @@ -37,10 +37,7 @@ import java.time.format.DateTimeFormatter internal fun SessionCard( modifier: Modifier = Modifier, ) { - KnightsCard( - modifier = modifier, - color = MaterialTheme.colorScheme.surface, - ) { + KnightsCard(modifier = modifier) { Column( modifier = Modifier.padding(CardContentPadding) ) { From 05f7efb5e63e287494344fe03b29068c8f2cccfd Mon Sep 17 00:00:00 2001 From: Youngjik Yoon Date: Wed, 26 Jul 2023 21:15:18 +0900 Subject: [PATCH 3/3] =?UTF-8?q?#104=20=ED=94=84=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app2023/core/designsystem/component/Card.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt b/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt index 85b31dc7..9f3f51f8 100644 --- a/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt +++ b/core/designsystem/src/main/java/com/droidknights/app2023/core/designsystem/component/Card.kt @@ -1,13 +1,17 @@ package com.droidknights.app2023.core.designsystem.component +import android.content.res.Configuration import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.droidknights.app2023.core.designsystem.theme.KnightsTheme @Composable fun KnightsCard( @@ -40,3 +44,12 @@ fun KnightsCard( content = content, ) } + +@Composable +@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES) +@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO) +private fun KnightsCardPreview() { + KnightsTheme { + KnightsCard(modifier = Modifier.size(320.dp, 160.dp), content = { }) + } +}