Skip to content

Commit 27ea1be

Browse files
florentmaitrepaulinea
authored andcommitted
Fix background of small list item previews
1 parent dceddae commit 27ea1be

26 files changed

Lines changed: 4 additions & 4 deletions

File tree

core/src/main/java/com/orange/ouds/core/component/OudsListItem.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,8 +1329,6 @@ internal data class OudsListItemPreviewParameter<T : OudsListItemLeadingTrailing
13291329
val decoration: OudsListItemDecoration = OudsListItemDecoration.None(divider = true),
13301330
val helperText: String? = null,
13311331
val boldLabel: Boolean = false,
1332-
val divider: Boolean = true,
1333-
val background: Boolean = false,
13341332
val enabled: Boolean = true
13351333
)
13361334

core/src/main/java/com/orange/ouds/core/component/OudsSmallListItem.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ internal fun PreviewOudsStaticSmallListItem(
507507
helperText = helperText,
508508
leading = leading,
509509
trailing = trailing,
510+
divider = decoration.divider,
511+
background = decoration is OudsListItemDecoration.Background || decoration is OudsListItemDecoration.BackgroundOnInteraction,
510512
verticalAlignment = verticalAlignment,
511513
boldLabel = boldLabel,
512514
enabled = enabled
@@ -544,8 +546,8 @@ internal fun PreviewOudsNavigationSmallListItem(
544546
verticalAlignment = verticalAlignment,
545547
leading = leading,
546548
trailing = trailing,
547-
divider = divider,
548-
background = background,
549+
divider = decoration.divider,
550+
background = decoration is OudsListItemDecoration.Background || decoration is OudsListItemDecoration.BackgroundOnInteraction,
549551
enabled = enabled
550552
)
551553
}
Loading
Loading
76 Bytes
Loading
41 Bytes
Loading
-225 Bytes
Loading
180 Bytes
Loading
1.21 KB
Loading
2.45 KB
Loading

0 commit comments

Comments
 (0)