Skip to content

Commit 8149ca8

Browse files
authored
Merge pull request #94 from YAPP-Github/refactor/#93-common-textbuttom
[Refactor/#93] BitnagilTextButton 공통 컴포넌트 수정
2 parents 936e119 + 9d2c2fe commit 8149ca8

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/atom/BitnagilTextButton.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ fun BitnagilTextButton(
5858

5959
Box(
6060
modifier = modifier
61-
.fillMaxWidth()
6261
.height(54.dp)
6362
.clip(shape)
6463
.background(backgroundColor)
@@ -122,13 +121,15 @@ private fun BitnagilTextButtonPreview() {
122121
text = "시작하기",
123122
onClick = {},
124123
enabled = false,
124+
modifier = Modifier.fillMaxWidth(),
125125
)
126126

127127
Spacer(modifier = Modifier.height(12.dp))
128128

129129
BitnagilTextButton(
130130
text = "시작하기",
131131
onClick = {},
132+
modifier = Modifier.fillMaxWidth(),
132133
)
133134

134135
Spacer(modifier = Modifier.height(12.dp))
@@ -139,6 +140,7 @@ private fun BitnagilTextButtonPreview() {
139140
colors = BitnagilTextButtonColor.skip(),
140141
textStyle = BitnagilTheme.typography.body2Regular,
141142
textDecoration = TextDecoration.Underline,
143+
modifier = Modifier.fillMaxWidth(),
142144
)
143145
}
144146
}

presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Column
77
import androidx.compose.foundation.layout.Spacer
88
import androidx.compose.foundation.layout.aspectRatio
99
import androidx.compose.foundation.layout.fillMaxSize
10+
import androidx.compose.foundation.layout.fillMaxWidth
1011
import androidx.compose.foundation.layout.height
1112
import androidx.compose.foundation.layout.padding
1213
import androidx.compose.foundation.layout.statusBarsPadding
@@ -200,6 +201,7 @@ private fun EmotionRecommendRoutineScreen(
200201
text = "변경하기",
201202
onClick = onClickRegisterRecommendRoutines,
202203
enabled = state.registerRecommendRoutinesButtonEnabled,
204+
modifier = Modifier.fillMaxWidth(),
203205
)
204206

205207
Spacer(modifier = Modifier.height(10.dp))
@@ -214,6 +216,7 @@ private fun EmotionRecommendRoutineScreen(
214216
),
215217
textStyle = BitnagilTheme.typography.body2Regular,
216218
textDecoration = TextDecoration.Underline,
219+
modifier = Modifier.fillMaxWidth(),
217220
)
218221
}
219222
}

presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/component/template/OnBoardingSelectTemplate.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.threegap.bitnagil.presentation.onboarding.component.template
22

33
import androidx.compose.foundation.layout.Column
44
import androidx.compose.foundation.layout.Spacer
5+
import androidx.compose.foundation.layout.fillMaxWidth
56
import androidx.compose.foundation.layout.height
67
import androidx.compose.foundation.layout.padding
78
import androidx.compose.foundation.rememberScrollState
@@ -76,6 +77,7 @@ fun OnBoardingSelectTemplate(
7677
text = "다음",
7778
onClick = onClickNextButton,
7879
enabled = nextButtonEnable,
80+
modifier = Modifier.fillMaxWidth(),
7981
)
8082

8183
onClickSkip?.let {
@@ -87,6 +89,7 @@ fun OnBoardingSelectTemplate(
8789
colors = BitnagilTextButtonColor.skip(),
8890
textStyle = BitnagilTheme.typography.body2Regular,
8991
textDecoration = TextDecoration.Underline,
92+
modifier = Modifier.fillMaxWidth(),
9093
)
9194
}
9295
}

presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ private fun WriteRoutineScreen(
333333
onClick = onClickRegister,
334334
enabled = state.registerButtonEnabled,
335335
modifier = Modifier
336-
.padding(start = 16.dp, end = 16.dp, top = 14.dp, bottom = 14.dp),
336+
.padding(start = 16.dp, end = 16.dp, top = 14.dp, bottom = 14.dp)
337+
.fillMaxWidth(),
337338
)
338339
}
339340
}

presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/template/TimePickerBottomSheet.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.view.View
44
import android.widget.TimePicker
55
import androidx.compose.foundation.background
66
import androidx.compose.foundation.layout.Column
7+
import androidx.compose.foundation.layout.fillMaxWidth
78
import androidx.compose.foundation.layout.padding
89
import androidx.compose.material3.ExperimentalMaterial3Api
910
import androidx.compose.material3.ModalBottomSheet
@@ -105,7 +106,9 @@ fun TimePickerBottomSheetContent(
105106
)
106107

107108
BitnagilTextButton(
108-
modifier = Modifier.padding(start = 16.dp, end = 16.dp, bottom = 14.dp),
109+
modifier = Modifier
110+
.padding(start = 16.dp, end = 16.dp, bottom = 14.dp)
111+
.fillMaxWidth(),
109112
text = "저장",
110113
onClick = {
111114
onTimeSelected(currentHour, currentMinute)

0 commit comments

Comments
 (0)