Skip to content

Commit cd13798

Browse files
committed
Feat: GuideBottomSheet 컴포넌트 구현
1 parent f96ff63 commit cd13798

File tree

1 file changed

+82
-0
lines changed
  • presentation/src/main/java/com/threegap/bitnagil/presentation/guide/component/template

1 file changed

+82
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
package com.threegap.bitnagil.presentation.guide.component.template
2+
3+
import androidx.compose.foundation.Image
4+
import androidx.compose.foundation.layout.Column
5+
import androidx.compose.foundation.layout.Spacer
6+
import androidx.compose.foundation.layout.aspectRatio
7+
import androidx.compose.foundation.layout.fillMaxWidth
8+
import androidx.compose.foundation.layout.height
9+
import androidx.compose.foundation.layout.padding
10+
import androidx.compose.material3.ExperimentalMaterial3Api
11+
import androidx.compose.material3.ModalBottomSheet
12+
import androidx.compose.material3.Text
13+
import androidx.compose.runtime.Composable
14+
import androidx.compose.ui.Modifier
15+
import androidx.compose.ui.res.painterResource
16+
import androidx.compose.ui.tooling.preview.Preview
17+
import androidx.compose.ui.unit.dp
18+
import com.threegap.bitnagil.designsystem.BitnagilTheme
19+
import com.threegap.bitnagil.presentation.guide.model.GuideType
20+
21+
@OptIn(ExperimentalMaterial3Api::class)
22+
@Composable
23+
fun GuideBottomSheet(
24+
guideType: GuideType,
25+
onDismissRequest: () -> Unit,
26+
modifier: Modifier = Modifier,
27+
) {
28+
ModalBottomSheet(
29+
onDismissRequest = onDismissRequest,
30+
containerColor = BitnagilTheme.colors.coolGray99,
31+
contentColor = BitnagilTheme.colors.coolGray99,
32+
modifier = modifier,
33+
) {
34+
GuideBottomSheetContent(
35+
guideType = guideType,
36+
modifier = Modifier
37+
.padding(horizontal = 24.dp)
38+
.padding(bottom = 26.dp),
39+
)
40+
}
41+
}
42+
43+
@Composable
44+
private fun GuideBottomSheetContent(
45+
guideType: GuideType,
46+
modifier: Modifier = Modifier,
47+
) {
48+
Column(
49+
modifier = modifier,
50+
) {
51+
Text(
52+
text = guideType.title,
53+
color = BitnagilTheme.colors.coolGray10,
54+
style = BitnagilTheme.typography.title3SemiBold,
55+
modifier = Modifier.padding(bottom = 10.dp),
56+
)
57+
58+
Text(
59+
text = guideType.description,
60+
color = BitnagilTheme.colors.coolGray40,
61+
style = BitnagilTheme.typography.body2Medium,
62+
)
63+
64+
Spacer(modifier = Modifier.height(24.dp))
65+
66+
Image(
67+
painter = painterResource(guideType.image),
68+
contentDescription = null,
69+
modifier = Modifier
70+
.fillMaxWidth()
71+
.aspectRatio(312f / 198f),
72+
)
73+
}
74+
}
75+
76+
@Preview(showBackground = true)
77+
@Composable
78+
private fun GuideBottomSheetContentPreview() {
79+
GuideBottomSheetContent(
80+
guideType = GuideType.REGISTER,
81+
)
82+
}

0 commit comments

Comments
 (0)