Skip to content

Commit

Permalink
Merge pull request #323 from Hous-Release/fix/DayItem-selected-color
Browse files Browse the repository at this point in the history
fix : DayItem color HousBluel2 -> HousBluel1
  • Loading branch information
murjune authored Mar 3, 2024
2 parents 1a750e4 + 1c62793 commit cdd7969
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -49,10 +49,14 @@ fun DayItemsPreView() {
val selectedList = remember {
mutableStateListOf<Boolean>().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
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit cdd7969

Please sign in to comment.