Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI/#20] 캘린더뷰 / 주간 캘린더 구현 #33

Merged
merged 16 commits into from
Jul 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[UI/#20] 주간 캘린더 + 당일 스크랩 목록 표시 화면 구현
  • Loading branch information
boiledEgg-s committed Jul 9, 2024
commit 9c70c38475d8ad852bc353486df140edfcfc1ab4
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.terning.feature.calendar

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.theme.Grey200
import com.terning.core.designsystem.theme.White
import com.terning.feature.calendar.models.Scrap
import java.time.LocalDate

@Composable
fun CalendarWeekWithScrap(
modifier: Modifier = Modifier,
selectedDate: LocalDate?,
scrapLists: List<List<Scrap>> = listOf(),
onDateSelected: (LocalDate) -> Unit
) {
Column(
modifier = modifier
) {
Card(
modifier = Modifier
.border(0.dp, Grey200, RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

줄바꿈 해주는게 쪼끔 더 가독성이 좋을 것 같아요!!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

border에도 named argument 달아주는 것도 좋을 것 같네용

.shadow(
shape = RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp),
elevation = 1.dp
),

shape = RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp),
) {
CalendarWeek(
modifier = Modifier
.fillMaxWidth()
.background(White),
selectedDate = selectedDate?: LocalDate.now(),
onDateSelected = onDateSelected
)
}

LazyColumn(
modifier = Modifier
.fillMaxWidth()
){
/*items(items = scrapLists[selectedDate?.dayOfMonth - 1]) {

}*/

}
}

}