Skip to content

Commit f96ff63

Browse files
committed
Feat: GuideButton 컴포넌트 구현
1 parent 2eb113d commit f96ff63

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

  • presentation/src/main/java/com/threegap/bitnagil/presentation/guide/component/atom
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package com.threegap.bitnagil.presentation.guide.component.atom
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.layout.Arrangement
5+
import androidx.compose.foundation.layout.Row
6+
import androidx.compose.foundation.layout.fillMaxWidth
7+
import androidx.compose.foundation.layout.height
8+
import androidx.compose.foundation.layout.padding
9+
import androidx.compose.foundation.shape.RoundedCornerShape
10+
import androidx.compose.material3.Text
11+
import androidx.compose.runtime.Composable
12+
import androidx.compose.ui.Alignment
13+
import androidx.compose.ui.Modifier
14+
import androidx.compose.ui.tooling.preview.Preview
15+
import androidx.compose.ui.unit.dp
16+
import com.threegap.bitnagil.designsystem.BitnagilTheme
17+
import com.threegap.bitnagil.designsystem.R
18+
import com.threegap.bitnagil.designsystem.component.atom.BitnagilIcon
19+
import com.threegap.bitnagil.designsystem.modifier.clickableWithoutRipple
20+
21+
@Composable
22+
fun GuideButton(
23+
title: String,
24+
onClick: () -> Unit,
25+
modifier: Modifier = Modifier,
26+
) {
27+
Row(
28+
modifier = modifier
29+
.background(
30+
color = BitnagilTheme.colors.coolGray99,
31+
shape = RoundedCornerShape(12.dp),
32+
)
33+
.fillMaxWidth()
34+
.height(56.dp)
35+
.clickableWithoutRipple { onClick() }
36+
.padding(vertical = 14.dp, horizontal = 20.dp),
37+
verticalAlignment = Alignment.CenterVertically,
38+
horizontalArrangement = Arrangement.SpaceBetween,
39+
) {
40+
Text(
41+
text = title,
42+
color = BitnagilTheme.colors.coolGray10,
43+
style = BitnagilTheme.typography.body2Medium,
44+
)
45+
46+
BitnagilIcon(
47+
id = R.drawable.ic_chevron_right_md,
48+
tint = BitnagilTheme.colors.coolGray10,
49+
)
50+
}
51+
}
52+
53+
@Preview
54+
@Composable
55+
private fun GuideButtonPreview() {
56+
GuideButton(
57+
title = "루틴 수정하기란?",
58+
onClick = {},
59+
)
60+
}

0 commit comments

Comments
 (0)