Skip to content

Commit

Permalink
[fix/#841] remove MyPageButton fillMaxWidth()
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Sep 25, 2024
1 parent eddf9a3 commit 52dbd50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,15 @@
*/
package org.sopt.official.feature.mypage.component

import androidx.annotation.StringRes
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
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
Expand All @@ -48,7 +44,7 @@ import org.sopt.official.designsystem.White
fun MyPageButton(
paddingVertical: Dp,
onClick: () -> Unit,
modifier: Modifier = Modifier,
modifier: Modifier = Modifier.fillMaxWidth(),
shape: Shape = RoundedCornerShape(10.dp),
isEnabled: Boolean = true,
containerColor: Color = White,
Expand All @@ -57,7 +53,7 @@ fun MyPageButton(
) {
Button(
contentPadding = PaddingValues(vertical = paddingVertical),
modifier = modifier.fillMaxWidth(),
modifier = modifier,
enabled = isEnabled,
colors = ButtonDefaults.buttonColors(
containerColor = containerColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ 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.wrapContentSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -70,7 +69,6 @@ fun MyPageDialog(
) {
Column(
modifier = modifier
.wrapContentSize()
.padding(horizontal = 25.dp)
.background(
color = Gray700,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -98,7 +99,9 @@ class AdjustSentenceActivity : AppCompatActivity() {
Spacer(modifier = Modifier.height(32.dp))
MyPageButton(
paddingVertical = 16.dp,
modifier = Modifier.padding(20.dp),
modifier = Modifier
.padding(20.dp)
.fillMaxWidth(),
onClick = { viewModel.adjustSentence() },
isEnabled = isConfirmed
) {
Expand Down

0 comments on commit 52dbd50

Please sign in to comment.