in android/source/src/main/kotlin/com/gu/source/components/pager/PagerProgressBar.kt [121:156]
fun PagerProgressBar(
pagerState: PagerState,
modifier: Modifier = Modifier,
buttonColours: ButtonColours = DefaultButtonColours,
disabledButtonColours: ButtonColours? = disabledModeButtonColours(buttonColours),
selectedIndicatorColour: AppColour = DefaultSelectedIndicatorColour,
unSelectedIndicatorColour: AppColour = DefaultUnSelectedIndicatorColour,
prevButtonContentDescription: String? = null,
nextButtonContentDescription: String? = null,
showProgressButtons: Boolean = isTabletDevice(),
) {
Box(
modifier = modifier
.progressBarPadding()
.fillMaxWidth(),
) {
PagerProgressIndicator(
pagerState = pagerState,
selectedIndicatorColour = selectedIndicatorColour.current,
unSelectedIndicatorColour = unSelectedIndicatorColour.current,
modifier = Modifier.align(Alignment.Center),
)
if (showProgressButtons) {
PagerProgressButtons(
pagerState = pagerState,
buttonColours = DefaultButtonColours,
prevButtonContentDescription = prevButtonContentDescription,
nextButtonContentDescription = nextButtonContentDescription,
modifier = Modifier
.offset(x = ProgressButtonTouchAdjustment)
.align(Alignment.CenterEnd),
disabledButtonColours = disabledButtonColours,
)
}
}
}