Skip to content

Commit

Permalink
[chore] #32 변수명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
2hyunjinn committed Jul 8, 2024
1 parent 7719b5c commit a622950
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fun DateRoadBasicTopBar(
title: String,
backGroundColor: Color = Color.Transparent,
iconLeftResource: Int? = null,
iconRightcontent: (@Composable () -> Unit)? = null
buttonContent: (@Composable () -> Unit)? = null
) {
var iconWidth by remember { mutableStateOf(0) }
var contentWidth by remember { mutableStateOf(0) }
Expand Down Expand Up @@ -60,15 +60,15 @@ fun DateRoadBasicTopBar(
)
}

if (iconRightcontent != null) {
if (buttonContent != null) {
Box(
modifier = Modifier
.align(Alignment.CenterEnd)
.onGloballyPositioned { coordinates ->
contentWidth = coordinates.size.width
}
) {
iconRightcontent()
buttonContent()
}
}

Expand Down Expand Up @@ -102,7 +102,7 @@ fun DateRoadBasicTopBarPreview() {
DateRoadBasicTopBar(
title = "데이트 일정",
iconLeftResource = R.drawable.ic_top_bar_back_white,
iconRightcontent = {
buttonContent = {
Icon(
painterResource(id = R.drawable.ic_top_bar_share),
contentDescription = null,
Expand All @@ -113,7 +113,7 @@ fun DateRoadBasicTopBarPreview() {
DateRoadBasicTopBar(
title = "데이트 일정데이트 일정데이트 일정데이트 일정일정데이트 일정데이트 일정",
iconLeftResource = R.drawable.ic_top_bar_back_white,
iconRightcontent = {
buttonContent = {
DateRoadFilledButton(
isEnabled = true,
textContent = "불러오기",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import org.sopt.dateroad.ui.theme.DateRoadTheme

@Composable
fun DateRoadCourseTopBar(
pointText: String,
content: (@Composable () -> Unit)? = null
title: String,
buttonContent: (@Composable () -> Unit)? = null
) {
Box(
modifier = Modifier
Expand All @@ -28,17 +28,17 @@ fun DateRoadCourseTopBar(
.padding(vertical = 12.dp, horizontal = 16.dp)
) {
Text(
text = pointText,
text = title,
style = DateRoadTheme.typography.titleBold20,
color = DateRoadTheme.colors.black,
textAlign = TextAlign.Center
)
if (content != null) {
if (buttonContent != null) {
Box(
modifier = Modifier
.align(Alignment.CenterEnd)
) {
content()
buttonContent()
}
}
}
Expand All @@ -49,8 +49,8 @@ fun DateRoadCourseTopBar(
fun DateRoadCourseTopBarPreview() {
Column {
DateRoadCourseTopBar(
pointText = "코스 둘러보기",
content = {
title = "코스 둘러보기",
buttonContent = {
DateRoadImageButton(
isEnabled = true,
onClick = {},
Expand All @@ -61,8 +61,8 @@ fun DateRoadCourseTopBarPreview() {
}
)
DateRoadCourseTopBar(
pointText = "데이트 일정",
content = {
title = "데이트 일정",
buttonContent = {
DateRoadImageButton(
isEnabled = true,
onClick = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.sopt.dateroad.ui.theme.DateRoadTheme

@Composable
fun DateRoadHomeTopBar(
pointText: String = "0 P"
title: String = "0 P"
) {
Row(
modifier = Modifier
Expand All @@ -36,7 +36,7 @@ fun DateRoadHomeTopBar(
)
Spacer(modifier = Modifier.weight(1f))
DateRoadPointTag(
text = pointText,
text = title,
profileImage = painterResource(id = R.drawable.img_top_bar_profile)
)
}
Expand Down

0 comments on commit a622950

Please sign in to comment.