You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
994 B
37 lines
994 B
4 years ago
|
package example.todo.common.ui
|
||
4 years ago
|
|
||
|
import androidx.compose.foundation.ExperimentalFoundationApi
|
||
|
import androidx.compose.foundation.lazy.LazyListState
|
||
|
import androidx.compose.runtime.Composable
|
||
|
import androidx.compose.ui.Modifier
|
||
|
import androidx.compose.ui.unit.Dp
|
||
|
import androidx.compose.ui.unit.dp
|
||
|
|
||
|
actual val MARGIN_SCROLLBAR: Dp = 8.dp
|
||
|
|
||
|
actual typealias ScrollbarAdapter = androidx.compose.foundation.ScrollbarAdapter
|
||
|
|
||
|
@OptIn(ExperimentalFoundationApi::class)
|
||
|
@Composable
|
||
|
actual fun rememberScrollbarAdapter(
|
||
|
scrollState: LazyListState,
|
||
|
itemCount: Int,
|
||
|
averageItemSize: Dp
|
||
|
): ScrollbarAdapter =
|
||
|
androidx.compose.foundation.rememberScrollbarAdapter(
|
||
|
scrollState = scrollState,
|
||
|
itemCount = itemCount,
|
||
|
averageItemSize = averageItemSize
|
||
|
)
|
||
|
|
||
|
@Composable
|
||
|
actual fun VerticalScrollbar(
|
||
|
modifier: Modifier,
|
||
|
adapter: ScrollbarAdapter
|
||
|
) {
|
||
|
androidx.compose.foundation.VerticalScrollbar(
|
||
|
modifier = modifier,
|
||
|
adapter = adapter
|
||
|
)
|
||
|
}
|