Skip to content

Commit

Permalink
[Feat/#34] StoreInfo 구조 변경 및 StoreInfoItem title strings 추출
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel4990 committed Jan 15, 2025
1 parent 9e4bb4a commit 6d6b8b6
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathEffect
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -31,7 +32,11 @@ import kotlinx.collections.immutable.immutableListOf
@Composable
fun StoreInfo(
menuContent: @Composable () -> Unit,
menuPaddingValues: PaddingValues,
menuShape: RoundedCornerShape,
locationContent: @Composable () -> Unit,
locationPaddingValues: PaddingValues,
locationShape: RoundedCornerShape,
modifier: Modifier = Modifier,
isBlurred: Boolean = true
) {
Expand All @@ -47,35 +52,17 @@ fun StoreInfo(
)
) {
StoreInfoItem(
title = "Menu",
title = stringResource(id = R.string.PLACE_DETAIL_STORE_INFO_MENU_TITLE),
content = menuContent,
padding = PaddingValues(
top = 20.dp,
bottom = 28.dp,
start = 16.dp,
end = 16.dp
),
shape = RoundedCornerShape(
topStart = 8.dp,
topEnd = 8.dp,
bottomStart = 20.dp,
bottomEnd = 20.dp
)
padding = menuPaddingValues,
shape = menuShape
)
HorizontalDashedLine()
StoreInfoItem(
title = "Location",
title = stringResource(id = R.string.PLACE_DETAIL_STORE_INFO_LOCATION_TITLE),
content = locationContent,
padding = PaddingValues(
vertical = 22.dp,
horizontal = 16.dp
),
shape = RoundedCornerShape(
topStart = 20.dp,
topEnd = 20.dp,
bottomStart = 8.dp,
bottomEnd = 8.dp
)
padding = locationPaddingValues,
shape = locationShape
)
}
}
Expand Down Expand Up @@ -144,6 +131,18 @@ private fun StoreInfoPreview() {
}
}
},
menuPaddingValues = PaddingValues(
top = 20.dp,
bottom = 28.dp,
start = 16.dp,
end = 16.dp
),
menuShape = RoundedCornerShape(
topStart = 8.dp,
topEnd = 8.dp,
bottomStart = 20.dp,
bottomEnd = 20.dp
),
locationContent = {
Text(
"어키",
Expand All @@ -161,7 +160,17 @@ private fun StoreInfoPreview() {
modifier = Modifier.fillMaxWidth()
)
}
}
},
locationPaddingValues = PaddingValues(
vertical = 22.dp,
horizontal = 16.dp
),
locationShape = RoundedCornerShape(
topStart = 20.dp,
topEnd = 20.dp,
bottomStart = 8.dp,
bottomEnd = 8.dp
)
)
StoreInfo(
modifier = Modifier
Expand All @@ -184,6 +193,18 @@ private fun StoreInfoPreview() {
}
}
},
menuPaddingValues = PaddingValues(
top = 20.dp,
bottom = 28.dp,
start = 16.dp,
end = 16.dp
),
menuShape = RoundedCornerShape(
topStart = 8.dp,
topEnd = 8.dp,
bottomStart = 20.dp,
bottomEnd = 20.dp
),
locationContent = {
Text(
"어키",
Expand All @@ -201,7 +222,17 @@ private fun StoreInfoPreview() {
modifier = Modifier.fillMaxWidth()
)
}
}
},
locationPaddingValues = PaddingValues(
vertical = 22.dp,
horizontal = 16.dp
),
locationShape = RoundedCornerShape(
topStart = 20.dp,
topEnd = 20.dp,
bottomStart = 8.dp,
bottomEnd = 8.dp
)
)
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<resources>
<string name="app_name">Spoony-Android</string>
<string name="COUNTER_TEXT">%1$s / %2$s</string>
<string name="PLACE_DETAIL_STORE_INFO_MENU_TITLE">Menu</string>
<string name="PLACE_DETAIL_STORE_INFO_LOCATION_TITLE">Location</string>
</resources>

0 comments on commit 6d6b8b6

Please sign in to comment.