Skip to content

Commit

Permalink
feat:TOP-109 Card background, stoke color
Browse files Browse the repository at this point in the history
  • Loading branch information
cwj-c committed Jan 5, 2025
1 parent 18e28d4 commit 9aacec1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
1 change: 1 addition & 0 deletions core/ui/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<color name="gray_2d2d2d">#2d2d2d</color>
<color name="gray_4b4b4b">#4b4b4b</color>
<color name="gray_939393">#939393</color>
<color name="gray_414141">#414141</color>

<color name="black_222222">#222222</color>
<color name="black_2c2c2c">#2c2c2c</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tht.feature.tohot.component.card

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
Expand All @@ -13,6 +14,7 @@ import androidx.compose.material.ButtonDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource
Expand All @@ -36,10 +38,25 @@ fun ToHotNotifyCard(
Column(
modifier = modifier
.background(
colorResource(id = tht.core.ui.R.color.black_222222)
brush = Brush.linearGradient(
colors = listOf(
colorResource(tht.core.ui.R.color.black_1D1D1D),
colorResource(tht.core.ui.R.color.black_161616),
colorResource(tht.core.ui.R.color.black_1D1D1D)
)
),
shape = RoundedCornerShape(12.dp)
)
.border(
width = 1.dp,
brush = Brush.linearGradient(
colors = listOf(
colorResource(tht.core.ui.R.color.gray_414141).copy(alpha = 0.3f),
colorResource(tht.core.ui.R.color.black_1A1A1A).copy(alpha = 0.9f)
)
),
shape = RoundedCornerShape(12.dp)
)
.fillMaxSize()
.clip(RoundedCornerShape(12.dp))
) {
ToHotEmptyTimeProgressContainer(
modifier = Modifier
Expand Down Expand Up @@ -97,6 +114,10 @@ fun ToHotNotifyCard(
@Preview
private fun ToHotNotifyCardPreview() {
ToHotNotifyCard(
modifier = Modifier
.fillMaxSize()
.padding(start = 14.dp, end = 14.dp, top = 6.dp, bottom = 14.dp)
.clip(RoundedCornerShape(12.dp)),
image = painterResource(id = R.drawable.ic_mudy_none_initial_user),
title = "가나다라마바사",
description = "preview",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ fun TopicSelectTypeCardScreen(
width = 1.dp,
brush = Brush.linearGradient(
colors = listOf(
colorResource(R.color.gray_8d8d8d).copy(alpha = 0.3f),
colorResource(R.color.black_414141).copy(alpha = 0.9f)
colorResource(R.color.gray_414141).copy(alpha = 0.3f),
colorResource(R.color.black_1A1A1A).copy(alpha = 0.9f)
)
),
shape = RoundedCornerShape(12.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ internal fun ToHotScreen(

is ToHotCardUiModel.Topic -> {
TopicSelectCard(
modifier = Modifier
.fillMaxSize()
.padding(start = 14.dp, end = 14.dp, top = 6.dp, bottom = 14.dp),
modifier = cardModifier,
topicCard = card.topic,
selectTopicIdx = topicInfo.selectTopicIdx,
onSelectTopic = onSelectTopic,
Expand Down

0 comments on commit 9aacec1

Please sign in to comment.