From 1c627930863dc829c9d4131952df877fc19a0612 Mon Sep 17 00:00:00 2001 From: murjune Date: Sun, 3 Mar 2024 19:46:25 +0900 Subject: [PATCH] fix : DayItem color HousBluel2 -> HousBluel1 --- .../hous/release/android/util/component/DayItems.kt | 10 +++++++--- .../hous/release/designsystem/component/HousDay.kt | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/hous/release/android/util/component/DayItems.kt b/app/src/main/java/hous/release/android/util/component/DayItems.kt index da66f491..7b78b96d 100644 --- a/app/src/main/java/hous/release/android/util/component/DayItems.kt +++ b/app/src/main/java/hous/release/android/util/component/DayItems.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.remember @@ -14,6 +13,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import hous.release.android.R import hous.release.designsystem.component.DayItem +import hous.release.designsystem.theme.HousTheme @Composable fun DayItems( @@ -49,10 +49,14 @@ fun DayItemsPreView() { val selectedList = remember { mutableStateListOf().apply { addAll(List(7) { false }) } } - MaterialTheme { + val selectTodoDay: (userIdx: Int, dayIdx: Int) -> Unit = { _, dayIdx -> + selectedList[dayIdx] = !selectedList[dayIdx] + } + HousTheme { DayItems( userIdx = 0, - dayList = selectedList + dayList = selectedList, + selectTodoDay = selectTodoDay ) } } diff --git a/designsystem/src/main/java/hous/release/designsystem/component/HousDay.kt b/designsystem/src/main/java/hous/release/designsystem/component/HousDay.kt index de87888f..deed0b16 100644 --- a/designsystem/src/main/java/hous/release/designsystem/component/HousDay.kt +++ b/designsystem/src/main/java/hous/release/designsystem/component/HousDay.kt @@ -17,7 +17,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import hous.release.designsystem.theme.HousBlue -import hous.release.designsystem.theme.HousBlueL2 +import hous.release.designsystem.theme.HousBlueL1 import hous.release.designsystem.theme.HousG1 import hous.release.designsystem.theme.HousG4 import hous.release.designsystem.theme.HousTheme @@ -35,7 +35,7 @@ fun DayItem( modifier = Modifier .clip(CircleShape) .background( - color = if (isSelected) HousBlueL2 else HousG1 + color = if (isSelected) HousBlueL1 else HousG1 ) .clickable { selectTodoDay(userIdx, dayIdx) @@ -62,7 +62,7 @@ fun DayItem( Box( modifier = Modifier .clip(CircleShape) - .background(color = if (isSelected) HousBlueL2 else HousG1) + .background(color = if (isSelected) HousBlueL1 else HousG1) .clickable { selectTodoDay(dayIdx) } .size(40.dp), contentAlignment = Alignment.Center