Skip to content

Commit

Permalink
Merge pull request #57 from Team-Walkie/style/challenge_main_padding
Browse files Browse the repository at this point in the history
챌린지 메인화면 아이템 패딩 조절
  • Loading branch information
soopeach authored Nov 30, 2023
2 parents 759f737 + 1eae279 commit b97b89c
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -119,13 +120,14 @@ fun ChallengeMainContent(
LazyColumn(
modifier = Modifier
.padding(paddingValues)
.padding(horizontal = 20.dp)
// .padding(horizontal = 20.dp)
) {

item {
Spacer(modifier = Modifier.height(10.dp))

Text(
modifier = Modifier.padding(horizontal = 20.dp),
text = "신규",
fontSize = 16.sp,
color = Color.Black,
Expand All @@ -138,7 +140,8 @@ fun ChallengeMainContent(
LazyRow(
modifier = Modifier
.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(13.dp)
horizontalArrangement = Arrangement.spacedBy(13.dp),
contentPadding = PaddingValues(20.dp)
) {

state.newChallengePreviewsState.getDataOrNull()?.let { newChallengePreviews ->
Expand All @@ -165,6 +168,7 @@ fun ChallengeMainContent(

item {
Text(
modifier = Modifier.padding(horizontal = 20.dp),
text = "도전중인 챌린지",
fontSize = 20.sp,
color = Color.Black,
Expand All @@ -174,7 +178,9 @@ fun ChallengeMainContent(
}

item {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Column(
modifier = Modifier.padding(horizontal = 20.dp),
horizontalAlignment = Alignment.CenterHorizontally) {

state.challengingPreviewsState.getDataOrNull()?.let { challengingPreviews ->
challengingPreviews.take(4).forEach {
Expand Down Expand Up @@ -208,6 +214,7 @@ fun ChallengeMainContent(

item {
Text(
modifier = Modifier.padding(horizontal = 20.dp),
text = "다른 챌린지도 도전해보세요!",
fontSize = 20.sp,
color = Color.Black,
Expand All @@ -218,6 +225,7 @@ fun ChallengeMainContent(

item {
Text(
modifier = Modifier.padding(horizontal = 20.dp),
text = "인기 챌린지",
fontSize = 16.sp,
color = Color.Black,
Expand All @@ -230,7 +238,8 @@ fun ChallengeMainContent(
LazyRow(
modifier = Modifier
.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(13.dp)
horizontalArrangement = Arrangement.spacedBy(13.dp),
contentPadding = PaddingValues(20.dp)
) {
state.newChallengePreviewsState.getDataOrNull()?.let { newChallengePreviews ->
newChallengePreviews.chunkedList(3).forEach { list ->
Expand Down Expand Up @@ -262,6 +271,7 @@ fun ChallengeMainContent(

item {
Text(
modifier = Modifier.padding(horizontal = 20.dp),
text = "유형별 챌린지",
fontSize = 16.sp,
color = Color.Black,
Expand Down Expand Up @@ -299,6 +309,7 @@ fun ChallengeMainContent(

HorizontalPager(
state = pagerState,
modifier = Modifier.padding(horizontal = 20.dp),
) {

state.typedChallengePreviewsState.getDataOrNull()
Expand Down

0 comments on commit b97b89c

Please sign in to comment.