|
1 | 1 | package com.record.upload.component.bottomsheet
|
2 | 2 |
|
| 3 | +import androidx.compose.foundation.Image |
| 4 | +import androidx.compose.foundation.background |
| 5 | +import androidx.compose.foundation.layout.Arrangement |
| 6 | +import androidx.compose.foundation.layout.Column |
| 7 | +import androidx.compose.foundation.layout.ExperimentalLayoutApi |
| 8 | +import androidx.compose.foundation.layout.FlowRow |
| 9 | +import androidx.compose.foundation.layout.fillMaxWidth |
| 10 | +import androidx.compose.foundation.layout.padding |
| 11 | +import androidx.compose.foundation.layout.wrapContentWidth |
| 12 | +import androidx.compose.foundation.shape.RoundedCornerShape |
3 | 13 | import androidx.compose.material3.ExperimentalMaterial3Api
|
4 | 14 | import androidx.compose.material3.SheetState
|
| 15 | +import androidx.compose.material3.Text |
5 | 16 | import androidx.compose.material3.rememberModalBottomSheetState
|
6 | 17 | import androidx.compose.runtime.Composable
|
| 18 | +import androidx.compose.ui.Alignment |
| 19 | +import androidx.compose.ui.Modifier |
| 20 | +import androidx.compose.ui.res.painterResource |
| 21 | +import androidx.compose.ui.unit.dp |
| 22 | +import com.record.designsystem.R |
| 23 | +import com.record.designsystem.component.bottomsheet.RecordyBottomSheet |
| 24 | +import com.record.designsystem.component.button.RecordyChipButton |
| 25 | +import com.record.designsystem.component.button.RecordyMiddleButton |
| 26 | +import com.record.designsystem.theme.RecordyTheme |
| 27 | +import timber.log.Timber |
7 | 28 |
|
8 |
| -@OptIn(ExperimentalMaterial3Api::class) |
| 29 | +@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) |
9 | 30 | @Composable
|
10 | 31 | fun DefinedContentBottomSheet(
|
11 | 32 | sheetState: SheetState = rememberModalBottomSheetState(),
|
12 | 33 | isSheetOpen: Boolean,
|
13 | 34 | onDismissRequest: () -> Unit,
|
14 | 35 | ) {
|
| 36 | + RecordyBottomSheet( |
| 37 | + isSheetOpen = isSheetOpen, |
| 38 | + sheetState = sheetState, |
| 39 | + onDismissRequest = onDismissRequest, |
| 40 | + shape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp), |
| 41 | + ) { |
| 42 | + Column( |
| 43 | + modifier = Modifier |
| 44 | + .fillMaxWidth() |
| 45 | + .background(RecordyTheme.colors.gray08) |
| 46 | + .padding(horizontal = 16.dp), |
| 47 | + ) { |
| 48 | + Image( |
| 49 | + modifier = Modifier |
| 50 | + .padding(vertical = 16.dp) |
| 51 | + .align(Alignment.CenterHorizontally), |
| 52 | + painter = painterResource(id = R.drawable.ic_drag_handle), |
| 53 | + contentDescription = null, |
| 54 | + ) |
| 55 | + Text( |
| 56 | + text = "키워드 선택", |
| 57 | + style = RecordyTheme.typography.subtitle, |
| 58 | + color = RecordyTheme.colors.gray01, |
| 59 | + modifier = Modifier |
| 60 | + .align(Alignment.CenterHorizontally), |
| 61 | + ) |
| 62 | + Text( |
| 63 | + text = "해당 공간은\n" + "어떤 느낌인가요?", |
| 64 | + style = RecordyTheme.typography.title1, |
| 65 | + color = RecordyTheme.colors.gray01, |
| 66 | + modifier = Modifier.padding(top = 22.dp, bottom = 11.dp), |
| 67 | + ) |
| 68 | + Text( |
| 69 | + text = "키워드 1~3개 선택 시, 프로필에서 취향을 분석해 드립니다.", |
| 70 | + style = RecordyTheme.typography.caption1, |
| 71 | + color = RecordyTheme.colors.gray03, |
| 72 | + ) |
| 73 | + FlowRow( |
| 74 | + modifier = Modifier |
| 75 | + .fillMaxWidth() |
| 76 | + .padding(top = 28.dp, bottom = 50.dp), |
| 77 | + verticalArrangement = Arrangement.spacedBy(12.dp), |
| 78 | + horizontalArrangement = Arrangement.spacedBy(6.dp), |
| 79 | + ) { |
| 80 | + val chips = listOf("asdsadasdasda", "asdasdb", "asdasdc", "dasd", "asdsadasdasda", "asdasdb", "asdasdc", "dasd", "asdsadasdasda", "asdasdb", "asdasdc", "dasd") |
| 81 | + chips.forEach { chip -> |
| 82 | + RecordyChipButton( |
| 83 | + text = "$chip", |
| 84 | + isActive = false, |
| 85 | + onClick = { Timber.d("close key word") }, |
| 86 | + ) |
| 87 | + } |
| 88 | + } |
| 89 | + RecordyMiddleButton( |
| 90 | + modifier = Modifier.wrapContentWidth().padding(bottom = 44.dp).align(Alignment.CenterHorizontally), |
| 91 | + text = "적용하기", |
| 92 | + onClick = { }, |
| 93 | + ) |
| 94 | + } |
| 95 | + } |
15 | 96 | }
|
0 commit comments