Package-level declarations

Types

Link copied to clipboard

Interface CountdownTimerSize defines the size configuration for a countdown timer. It includes properties for vertical and horizontal padding that can be used to adjust the layout of the timer boxes.

Link copied to clipboard
class CountdownTimerState(val endDate: Long)

Represents a countdown timer state with functionality to track the remaining time, control the timer's visibility, and handle the timer's lifecycle events.

Link copied to clipboard

Immutable interface CountdownTimerStyle defines the styling configuration for a countdown timer. It includes properties such as background color, separator text style, and a function to get the text style based on the countdown timer's size.

Link copied to clipboard
sealed interface KPCountdownTimerSize

Sealed interface TrendyolCountdownTimerSize defines the size options for the countdown timer in the Trendyol design system. It allows for specific configurations for different sizes, each with its own vertical and horizontal padding values.

Link copied to clipboard
sealed interface KPCountdownTimerStyle

Sealed interface TrendyolCountdownTimerStyle defines specific styles for the countdown timer used in the Trendyol design system. It can have different implementations for various styling needs.

Functions

Link copied to clipboard
fun KPCountdownTimer(size: CountdownTimerSize, endDate: Long, modifier: Modifier = Modifier, onTimerFinish: () -> Unit = {}, style: CountdownTimerStyle = KPCountdownTimerStyle.Primary, backgroundAlpha: Float = 1.0f)

A composable function that displays a countdown timer with hours, minutes, and seconds. The timer counts down to the specified endDate and is styled according to the provided CountdownTimerStyle and CountdownTimerSize. The composable automatically handles the lifecycle of the countdown timer, including starting and stopping the timer.