Skip to content

Commit

Permalink
#310 [fix] RepresentRuleList - Modifier 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Sep 2, 2023
1 parent a63fe75 commit 33e5ed1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ import hous.release.domain.entity.rule.Rule

@Composable
fun RepresentRuleList(
modifier: Modifier = Modifier,
rules: List<RepresentRuleUiModel> = emptyList(),
onClick: (Int) -> Unit = {}
) {
if (rules.isEmpty()) {
RuleEmptyContent()
}
LazyColumn {
LazyColumn(modifier = modifier) {
itemsIndexed(rules, key = { _, rule -> rule.id }) { _, rule ->
RepresentRuleItem(rule, onClick)
}
Expand All @@ -52,7 +53,7 @@ private fun RepresentRuleItem(
onClick = { onClick(rule.id) },
indication = LocalIndication.current
)
.padding(start = 16.dp, top = 12.dp, bottom = 12.dp, end = 16.dp),
.padding(start = 24.dp, top = 12.dp, bottom = 12.dp, end = 16.dp),
text = rule.name,
isShowTrailingIcon = true,
leadingIcon = {
Expand Down Expand Up @@ -91,7 +92,7 @@ private fun Preview1() {
}
}
}
RepresentRuleList(rules, onClick)
RepresentRuleList(rules = rules, onClick = onClick)
}
}

Expand Down

0 comments on commit 33e5ed1

Please sign in to comment.