Skip to content

Commit 03eefb2

Browse files
committed
[BOOK-61] feat: ButtonColorStyle에 KAKAO 타입 추가 및 로그인 버튼 적용
1 parent 8e29b2f commit 03eefb2

File tree

3 files changed

+18
-50
lines changed

3 files changed

+18
-50
lines changed

core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ButtonColorStyle.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
package com.ninecraft.booket.core.designsystem.component.button
22

33
import androidx.compose.runtime.Composable
4+
import com.ninecraft.booket.core.designsystem.theme.Kakao
45
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
56

67
enum class ReedButtonColorStyle {
7-
PRIMARY, SECONDARY, TERTIARY;
8+
PRIMARY, SECONDARY, TERTIARY, KAKAO;
89

910
@Composable
1011
fun containerColor(isPressed: Boolean) = when (this) {
1112
PRIMARY -> if (isPressed) ReedTheme.colors.bgPrimaryPressed else ReedTheme.colors.bgPrimary
1213
SECONDARY -> if (isPressed) ReedTheme.colors.bgSecondaryPressed else ReedTheme.colors.bgSecondary
1314
TERTIARY -> if (isPressed) ReedTheme.colors.bgTertiaryPressed else ReedTheme.colors.bgTertiary
15+
KAKAO -> Kakao
1416
}
1517

1618
@Composable
1719
fun contentColor() = when (this) {
1820
PRIMARY -> ReedTheme.colors.contentInverse
1921
SECONDARY -> ReedTheme.colors.contentPrimary
2022
TERTIARY -> ReedTheme.colors.contentBrand
23+
KAKAO -> ReedTheme.colors.contentPrimary
2124
}
2225

2326
@Composable

feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginScreen.kt

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ import androidx.compose.ui.graphics.Color
1717
import androidx.compose.ui.graphics.vector.ImageVector
1818
import androidx.compose.ui.res.stringResource
1919
import androidx.compose.ui.res.vectorResource
20-
import androidx.compose.ui.text.TextStyle
21-
import androidx.compose.ui.text.font.FontWeight
2220
import androidx.compose.ui.unit.dp
23-
import androidx.compose.ui.unit.sp
2421
import com.ninecraft.booket.core.designsystem.DevicePreview
25-
import com.ninecraft.booket.core.designsystem.component.button.BooketButton
26-
import com.ninecraft.booket.core.designsystem.theme.Kakao
22+
import com.ninecraft.booket.core.designsystem.component.button.ReedButton
23+
import com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle
24+
import com.ninecraft.booket.core.designsystem.component.button.largeButtonStyle
2725
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
2826
import com.slack.circuit.codegen.annotations.CircuitInject
2927
import com.slack.circuit.runtime.CircuitUiEvent
@@ -74,7 +72,7 @@ internal fun Login(
7472
text = "로그인",
7573
modifier = Modifier.align(Alignment.Center),
7674
)
77-
BooketButton(
75+
ReedButton(
7876
onClick = {
7977
state.eventSink(LoginScreen.Event.OnKakaoLoginButtonClick)
8078
},
@@ -83,19 +81,9 @@ internal fun Login(
8381
.padding(start = 32.dp, end = 32.dp, bottom = 32.dp)
8482
.height(56.dp)
8583
.align(Alignment.BottomCenter),
86-
containerColor = Kakao,
87-
contentColor = Color(0xFF121212),
88-
text = {
89-
Text(
90-
text = stringResource(id = R.string.kakao_login),
91-
fontSize = 18.sp,
92-
style = TextStyle(
93-
fontWeight = FontWeight.SemiBold,
94-
fontSize = 18.sp,
95-
lineHeight = 25.sp,
96-
),
97-
)
98-
},
84+
colorStyle = ReedButtonColorStyle.KAKAO,
85+
sizeStyle = largeButtonStyle,
86+
text = stringResource(id = R.string.kakao_login),
9987
leadingIcon = {
10088
Icon(
10189
imageVector = ImageVector.vectorResource(id = R.drawable.ic_kakao),
Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
android:width="20dp"
3-
android:height="20dp"
4-
android:viewportWidth="20"
5-
android:viewportHeight="20">
6-
<group>
7-
<clip-path
8-
android:pathData="M2,2h17v17h-17z"/>
9-
<path
10-
android:pathData="M10.5,2C5.806,2 2,5.275 2,9.314C2,11.942 3.614,14.248 6.032,15.537C5.853,16.26 5.389,18.155 5.293,18.559C5.179,19.064 5.463,19.054 5.649,18.919C5.794,18.812 7.977,17.196 8.92,16.499C9.43,16.583 9.959,16.624 10.497,16.624C15.191,16.624 18.997,13.349 18.997,9.31C18.997,5.271 15.197,2 10.5,2Z"
11-
android:fillColor="#381E1E"/>
12-
<path
13-
android:pathData="M4.539,6.984C4.019,6.984 4.019,7.977 4.539,7.977H5.426C5.426,7.977 5.432,10.66 5.426,11.276C5.426,11.727 6.347,11.75 6.347,11.299V8.071C6.347,8.071 6.647,8.001 7.232,8.001C7.782,8.001 7.782,6.984 7.232,6.984H4.539Z"
14-
android:fillColor="#EED823"/>
15-
<path
16-
android:pathData="M8.889,8.22L9.384,9.899H8.357L8.892,8.22H8.889ZM8.339,7.432C8.119,7.954 7.334,10.421 7.071,11.077C6.882,11.552 7.699,11.935 7.887,11.464L8.064,10.788H9.684C9.684,10.788 9.628,10.814 9.845,11.434C10.018,11.935 10.859,11.589 10.686,11.087C10.438,10.374 9.576,7.799 9.418,7.432C9.344,7.264 9.084,7.143 8.834,7.143C8.626,7.143 8.422,7.227 8.336,7.432"
17-
android:fillColor="#FFE600"/>
18-
<group>
19-
<clip-path
20-
android:pathData="M8.889,8.22L9.384,9.899H8.357L8.892,8.22H8.889ZM8.339,7.432C8.119,7.954 7.334,10.421 7.071,11.077C6.882,11.552 7.699,11.935 7.887,11.464L8.064,10.788H9.684C9.684,10.788 9.628,10.814 9.845,11.434C10.018,11.935 10.859,11.589 10.686,11.087C10.438,10.374 9.576,7.799 9.418,7.432C9.344,7.264 9.084,7.143 8.834,7.143C8.626,7.143 8.422,7.227 8.336,7.432"/>
21-
<path
22-
android:pathData="M10.859,7.143H6.882V11.935H10.859V7.143Z"
23-
android:fillColor="#EED823"/>
24-
</group>
25-
<path
26-
android:pathData="M11.032,7.583C11.032,8.421 11.035,11.124 11.035,11.124C11.035,11.124 10.964,11.662 11.387,11.662C11.811,11.662 12.748,11.659 13.165,11.659C13.583,11.659 13.58,10.696 13.165,10.696C12.751,10.696 11.99,10.693 11.99,10.693C11.99,10.693 11.993,8.192 11.99,7.586C11.99,7.294 11.752,7.146 11.511,7.146C11.27,7.146 11.029,7.294 11.032,7.586"
27-
android:fillColor="#EED823"/>
28-
<path
29-
android:pathData="M13.731,7.448C13.74,7.815 13.719,11.141 13.719,11.39C13.719,11.777 14.628,11.777 14.628,11.39C14.628,10.939 14.628,10.08 14.628,10.08L14.894,9.848L16.063,11.582C16.298,11.922 17.04,11.309 16.805,10.969L15.565,9.192C15.565,9.192 16.406,8.199 16.737,7.842C16.931,7.634 16.331,6.977 16.137,7.186C15.948,7.388 14.631,8.825 14.631,8.825C14.631,8.825 14.643,7.923 14.631,7.425C14.628,7.236 14.415,7.146 14.195,7.146C13.963,7.146 13.722,7.25 13.728,7.452"
30-
android:fillColor="#EED823"/>
31-
</group>
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:pathData="M12.242,3.846C7.124,3.846 2.997,7.148 2.997,11.156C2.997,13.758 4.714,16.036 7.289,17.337L6.418,20.592C6.401,20.641 6.399,20.694 6.41,20.744C6.422,20.794 6.447,20.84 6.484,20.876C6.537,20.923 6.605,20.949 6.675,20.949C6.734,20.944 6.789,20.921 6.834,20.883L10.585,18.354C11.138,18.43 11.696,18.47 12.255,18.473C17.366,18.473 21.5,15.171 21.5,11.156C21.5,7.141 17.353,3.846 12.242,3.846Z"
8+
android:fillColor="#262626"/>
329
</vector>

0 commit comments

Comments
 (0)