Skip to content

Commit

Permalink
[MOD/#62] 기타 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
boiledEgg-s committed Jul 12, 2024
1 parent 8f255f1 commit 722141b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.terning.core.designsystem.component.item

import android.util.Log
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
Expand All @@ -8,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand All @@ -19,6 +21,8 @@ import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.theme.CalPink
import com.terning.core.designsystem.theme.CalPurple
import com.terning.core.designsystem.theme.Grey150
import com.terning.core.designsystem.theme.TerningPointTheme
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White

/**
Expand Down Expand Up @@ -49,16 +53,8 @@ fun ScrapBox(
.shadow(
elevation = elevation,
RoundedCornerShape(cornerRadius),
)
).background(scrapColor)
) {
Box(
modifier = Modifier
.background(
color = scrapColor,
shape = RoundedCornerShape(cornerRadius)
)
.fillMaxSize()
)
Box(
modifier = Modifier
.fillMaxSize()
Expand Down Expand Up @@ -90,12 +86,20 @@ fun BorderedScrapBoxPreview() {
@Preview(showBackground = true)
@Composable
fun ShadowedScrapBoxPreview() {
ScrapBox(
modifier = Modifier
.height(height = 92.dp)
.fillMaxWidth(),
scrapColor = CalPurple,
cornerRadius = 10.dp,
elevation = 1.dp
) {}
TerningPointTheme {
ScrapBox(
modifier = Modifier,
scrapColor = CalPurple,
cornerRadius = 10.dp,
elevation = 1.dp
) {
InternItem(
imageUrl = "",
title = "[Someone] 콘텐츠 마케터 대학생",
dateDeadline = "3",
workingPeriod = "3",
isScraped = false
)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
package com.terning.feature.calendar.scrap

import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.component.item.InternItem
import com.terning.core.designsystem.component.item.ScrapBox
import com.terning.core.designsystem.theme.CalBlue1
import com.terning.core.designsystem.theme.TerningPointTheme
import com.terning.feature.calendar.models.Scrap

@Composable
Expand All @@ -18,12 +13,10 @@ fun CalendarScrap(
modifier: Modifier = Modifier,
) {
ScrapBox(
modifier = modifier,
cornerRadius = 10.dp,
scrapColor = scrap.backgroundColor,
elevation = 1.dp,
modifier = modifier
.height(height = 92.dp)
.fillMaxWidth(),
) {
InternItem(
imageUrl = scrap.image.orEmpty(),
Expand All @@ -33,20 +26,4 @@ fun CalendarScrap(
isScraped = scrap.isScraped
)
}
}

@Preview(showBackground = true)
@Composable
fun CalendarScrapPreview() {
TerningPointTheme {
CalendarScrap(
scrap = Scrap(
text = "Task1_1",
backgroundColor = CalBlue1,
dDay = "1",
period = "3",
isScraped = true
)
)
}
}

0 comments on commit 722141b

Please sign in to comment.