Skip to content

Commit

Permalink
[fix/#841] paddingShape -> shape
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Sep 24, 2024
1 parent c6239ad commit 9834a95
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,24 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import org.sopt.official.designsystem.Black
import org.sopt.official.designsystem.Gray300
import org.sopt.official.designsystem.Gray600
import org.sopt.official.designsystem.White

@Composable
fun MyPageButton(
paddingShape: Dp,
style: TextStyle,
paddingVertical: Dp,
@StringRes text: Int,
onClick: () -> Unit,
modifier: Modifier = Modifier,
shape: Shape = RoundedCornerShape(10.dp),
isEnabled: Boolean = true,
containerColor: Color = White,
contentColor: Color = Black
Expand All @@ -64,7 +66,7 @@ fun MyPageButton(
disabledContainerColor = Gray600,
disabledContentColor = Gray300
),
shape = RoundedCornerShape(paddingShape),
shape = shape,
onClick = onClick
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ fun MyPageDialog(
) {
MyPageButton(
modifier = Modifier.weight(1f),
paddingShape = 10.dp,
style = SoptTheme.typography.body14M,
paddingVertical = 9.dp,
text = negativeText,
Expand All @@ -110,7 +109,6 @@ fun MyPageDialog(
Spacer(modifier = Modifier.width(6.dp))
MyPageButton(
modifier = Modifier.weight(1f),
paddingShape = 10.dp,
style = SoptTheme.typography.body14M,
paddingVertical = 9.dp,
text = positiveText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ import org.sopt.official.feature.mypage.R
fun MyPageItem(
text: String,
modifier: Modifier = Modifier,
onButtonClick: () -> Unit = {}
onClick: () -> Unit = {}
) {
Row(
modifier = modifier
.fillMaxWidth()
.clickable {
onButtonClick()
},
.clickable(onClick = onClick),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fun MyPageSection(items: List<MyPageUiModel>) {
is MyPageUiModel.MyPageItem -> {
MyPageItem(
text = item.title,
onButtonClick = item.onItemClick
onClick = item.onItemClick
)
Spacer(modifier = Modifier.height(22.dp))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ class SignOutActivity : AppCompatActivity() {
MyPageButton(
paddingVertical = 16.dp,
style = SoptTheme.typography.heading18B,
paddingShape = 10.dp,
modifier = Modifier.padding(20.dp),
onClick = { viewModel.signOut() },
text = R.string.sign_out_button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class AdjustSentenceActivity : AppCompatActivity() {
MyPageButton(
paddingVertical = 16.dp,
style = SoptTheme.typography.heading18B,
paddingShape = 10.dp,
modifier = Modifier.padding(20.dp),
onClick = { viewModel.adjustSentence() },
text = R.string.adjust_sentence_button,
Expand Down

0 comments on commit 9834a95

Please sign in to comment.