|
1 | 1 | package com.kuit.ourmenu.ui.addmenu.screen
|
2 | 2 |
|
| 3 | +import androidx.compose.foundation.layout.Column |
| 4 | +import androidx.compose.foundation.layout.fillMaxSize |
| 5 | +import androidx.compose.foundation.layout.fillMaxWidth |
| 6 | +import androidx.compose.foundation.layout.padding |
| 7 | +import androidx.compose.material3.Button |
| 8 | +import androidx.compose.material3.ExperimentalMaterial3Api |
| 9 | +import androidx.compose.material3.Icon |
| 10 | +import androidx.compose.material3.IconButton |
| 11 | +import androidx.compose.material3.Scaffold |
| 12 | +import androidx.compose.material3.Text |
| 13 | +import androidx.compose.material3.TopAppBar |
3 | 14 | import androidx.compose.runtime.Composable
|
| 15 | +import androidx.compose.ui.Alignment |
4 | 16 | import androidx.compose.ui.Modifier
|
| 17 | +import androidx.compose.ui.draw.drawBehind |
| 18 | +import androidx.compose.ui.draw.shadow |
| 19 | +import androidx.compose.ui.graphics.Color |
| 20 | +import androidx.compose.ui.res.painterResource |
| 21 | +import androidx.compose.ui.text.font.FontWeight |
5 | 22 | import androidx.compose.ui.tooling.preview.Preview
|
| 23 | +import androidx.compose.ui.unit.dp |
| 24 | +import com.kuit.ourmenu.R |
6 | 25 |
|
| 26 | +@OptIn(ExperimentalMaterial3Api::class) |
7 | 27 | @Composable
|
8 | 28 | fun AddMenuSearchScreen(modifier: Modifier = Modifier) {
|
| 29 | + Scaffold(modifier = Modifier.fillMaxSize(), |
| 30 | + topBar = { |
| 31 | + TopAppBar( |
| 32 | + title = { |
| 33 | + Text( |
| 34 | + "OURMENU", |
| 35 | + color = Color(0xFFFF5420), |
| 36 | + fontWeight = FontWeight.Bold |
| 37 | + ) |
| 38 | + }, |
| 39 | + navigationIcon = { |
| 40 | + IconButton(onClick = { TODO("뒤로가기 구현") }) { |
| 41 | + Icon( |
| 42 | + painter = painterResource(R.drawable.ic_top_bar_back), |
| 43 | + contentDescription = "Back" |
| 44 | + ) |
| 45 | + } |
| 46 | + }, |
| 47 | + modifier = Modifier |
| 48 | + .drawBehind { |
| 49 | + drawRect( |
| 50 | + color = Color.Black |
| 51 | + ) |
| 52 | + } |
| 53 | + .shadow(elevation = 4.dp) |
| 54 | + ) |
| 55 | + }, |
| 56 | + bottomBar = { |
| 57 | + Column( |
| 58 | + modifier = Modifier |
| 59 | + .fillMaxWidth() |
| 60 | + .padding(start = 20.dp, end = 20.dp, bottom = 20.dp), |
| 61 | + horizontalAlignment = Alignment.CenterHorizontally |
| 62 | + ) { |
| 63 | + Button(onClick = { /*TODO*/ }) { |
| 64 | + Text("가게와 메뉴 직접 추가하기") |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + content = { paddingValues -> |
| 69 | + Column( |
| 70 | + modifier = Modifier |
| 71 | + .padding(paddingValues) |
| 72 | + .fillMaxWidth(), |
| 73 | + horizontalAlignment = Alignment.CenterHorizontally |
| 74 | + ) { |
| 75 | + Text("content") |
| 76 | + } |
| 77 | + } |
| 78 | + ) |
9 | 79 |
|
10 | 80 | }
|
11 | 81 |
|
|
0 commit comments