Skip to content

Commit d8cf33b

Browse files
committed
DON-1396 Use tokens for size
1 parent 5578625 commit d8cf33b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/src/main/java/net/skyscanner/backpack/demo/compose/CalendarStory.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fun CalendarLoading(modifier: Modifier = Modifier) {
110110
var type by remember { mutableStateOf(CalendarStoryType.Loading) }
111111
CalendarDemo(type, modifier)
112112
LaunchedEffect(Unit) {
113-
delay(10)
113+
delay(1000)
114114
type = CalendarStoryType.WithIconAsLabels
115115
}
116116
}

backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/calendar/internal/BpkCalendarDayCell.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,13 @@ internal fun BpkCalendarDayCell(
198198
BpkShimmerOverlay(
199199
shimmerSize = BpkShimmerSize.Small,
200200
) {
201+
val width = BpkSpacing.Lg + BpkSpacing.Sm
202+
val height = BpkSpacing.Md + BpkSpacing.Sm
201203
BpkHeadlineSkeleton(
202204
skeletonHeightSize = BpkSkeletonHeightSizeType.Custom,
203205
modifier = Modifier
204206
.semantics { contentDescription = label.contentDescription }
205-
.size(width = 28.dp, height = 12.dp)
207+
.size(width = width, height = height)
206208
.align(Alignment.Center),
207209
)
208210
}

backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/skeleton/BpkSkeleton.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ enum class BpkShimmerSize(
106106
val durationMillis: Int,
107107
val delayMillis: Int,
108108
) {
109-
Large(1000, 200), Small(300, 0)
109+
Large(1000, 200), Small(300, 10)
110110
}
111111

112112
private fun Modifier.enhanceHeadlineHeight(skeletonHeightSize: BpkSkeletonHeightSizeType): Modifier {

0 commit comments

Comments
 (0)