generated from AND-SOPT-ANDROID/and-sopt-android-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] : #3 HomeSectionHeader 컴포넌트 추가
- Loading branch information
1 parent
c22f361
commit c400c38
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
app/src/main/java/org/sopt/and/presentation/component/HomeSectionHeader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.sopt.and.presentation.component | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.automirrored.outlined.KeyboardArrowRight | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp | ||
import org.sopt.and.ui.theme.White | ||
|
||
// 홈 화면 제목 + > 버튼 컴포넌트 | ||
@Composable | ||
fun HomeSectionHeader( | ||
title: String, | ||
//onArrowClick: () -> Unit = {} // 화살표 아이콘 클릭 동작을 외부에서 지정 가능하게 | ||
) { | ||
Row( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(horizontal = 8.dp), | ||
verticalAlignment = Alignment.CenterVertically, | ||
horizontalArrangement = Arrangement.SpaceBetween | ||
) { | ||
Text( | ||
text = title, | ||
color = White, | ||
fontSize = 18.sp, | ||
fontWeight = FontWeight.Bold | ||
) | ||
Icon( | ||
imageVector = Icons.AutoMirrored.Outlined.KeyboardArrowRight, | ||
contentDescription = "next", | ||
tint = White, | ||
modifier = Modifier.size(32.dp) | ||
) | ||
} | ||
} |