2022-05-16 23:08:04 -04:00
|
|
|
package eu.kanade.presentation.components
|
|
|
|
|
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
import androidx.compose.ui.unit.Dp
|
2022-06-04 16:01:49 -04:00
|
|
|
import androidx.compose.ui.unit.dp
|
2022-05-16 23:08:04 -04:00
|
|
|
import com.google.accompanist.swiperefresh.SwipeRefreshState
|
|
|
|
import com.google.accompanist.swiperefresh.SwipeRefreshIndicator as AccompanistSwipeRefreshIndicator
|
|
|
|
|
|
|
|
@Composable
|
2022-06-04 16:01:49 -04:00
|
|
|
fun SwipeRefreshIndicator(
|
|
|
|
state: SwipeRefreshState,
|
|
|
|
refreshTriggerDistance: Dp,
|
|
|
|
refreshingOffset: Dp = 16.dp,
|
|
|
|
) {
|
2022-05-16 23:08:04 -04:00
|
|
|
AccompanistSwipeRefreshIndicator(
|
|
|
|
state = state,
|
2022-06-04 16:01:49 -04:00
|
|
|
refreshTriggerDistance = refreshTriggerDistance,
|
2022-05-16 23:08:04 -04:00
|
|
|
backgroundColor = MaterialTheme.colorScheme.primary,
|
|
|
|
contentColor = MaterialTheme.colorScheme.onPrimary,
|
2022-06-04 16:01:49 -04:00
|
|
|
refreshingOffset = refreshingOffset,
|
2022-05-16 23:08:04 -04:00
|
|
|
)
|
|
|
|
}
|