Skip to content

Commit

Permalink
chore: conflicts 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
syb8200 committed Jan 12, 2024
2 parents 06eebc7 + 7c62975 commit 1fe5276
Show file tree
Hide file tree
Showing 49 changed files with 1,792 additions and 148 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package com.susu.core.designsystem.component.appbar

import android.util.Log
import androidx.annotation.DrawableRes
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Button
import androidx.compose.material3.Icon
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand All @@ -16,41 +12,22 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.susu.core.designsystem.R
import com.susu.core.designsystem.component.appbar.icon.BackIcon
import com.susu.core.designsystem.theme.SusuTheme
import com.susu.core.ui.extension.susuClickable

@Composable
fun SusuProgressAppBar(
modifier: Modifier = Modifier,
@DrawableRes leftIcon: Int? = null,
leftIconContentDescription: String? = null,
leftIconPadding: Dp = SusuTheme.spacing.spacing_xs,
leftIcon: @Composable () -> Unit = {},
currentStep: Int,
entireStep: Int,
progressBar: ProgressBarStyle = ProgressBarStyle.SusuProgressBar,
onClickBackButton: () -> Unit,
) {
BasicAppBar(
modifier = modifier,
leftIcon = {
leftIcon?.let {
Icon(
painter = painterResource(id = leftIcon),
contentDescription = leftIconContentDescription,
modifier = Modifier
.susuClickable(
rippleEnabled = true,
onClick = onClickBackButton,
)
.padding(leftIconPadding),
)
}
},
leftIcon = leftIcon,
title = {
LinearProgressIndicator(
progress = { currentStep / entireStep.toFloat() },
Expand All @@ -72,19 +49,16 @@ fun SusuProgressAppBar(
fun SusuProgressAppBarPreview() {
val entireStep = 6
var currentStep by remember { mutableStateOf(1) }

SusuTheme {
Column(
verticalArrangement = Arrangement.spacedBy(20.dp),
) {
SusuProgressAppBar(
leftIcon = R.drawable.ic_arrow_left,
leftIconContentDescription = "뒤로가기",
leftIcon = {
BackIcon()
},
currentStep = currentStep,
entireStep = entireStep,
onClickBackButton = {
Log.d("확인", "왼쪽 뒤로가기 클릭")
},
)
Button(
onClick = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.susu.core.designsystem.component.button

import androidx.compose.foundation.border
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.susu.core.designsystem.R
import com.susu.core.designsystem.theme.Gray30
import com.susu.core.designsystem.theme.SusuTheme
import com.susu.core.ui.extension.susuClickable

@Composable
fun RefreshButton(
modifier: Modifier = Modifier,
onClick: () -> Unit = {},
) {
Icon(
modifier = modifier
.border(
width = 1.dp,
color = Gray30,
shape = RoundedCornerShape(size = 100.dp),
)
.size(44.dp)
.clip(RoundedCornerShape(size = 100.dp))
.susuClickable(onClick = onClick)
.padding(SusuTheme.spacing.spacing_xs),
painter = painterResource(id = R.drawable.ic_refresh),
contentDescription = stringResource(R.string.content_description_refresh),
)
}

@Preview(showBackground = true)
@Composable
fun RefreshButtonPreview() {
SusuTheme {
RefreshButton()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fun SusuRecentSearchContainer(
.clip(CircleShape)
.susuClickable(onClick = onClickCloseIcon),
painter = painterResource(id = R.drawable.ic_recent_search_close),
contentDescription = stringResource(R.string.content_description_close_icon),
contentDescription = stringResource(com.susu.core.ui.R.string.content_description_close_icon),
)
}
}
Expand Down
Loading

0 comments on commit 1fe5276

Please sign in to comment.