Skip to content

Commit

Permalink
Merge pull request #29 from matiasilveiro/modifiers_added
Browse files Browse the repository at this point in the history
Added 'modifier' parameter to the scrollbar composables
  • Loading branch information
nanihadesuka committed Feb 6, 2024
2 parents 9896205 + 7155849 commit de93bf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/src/main/java/my/nanihadesuka/compose/ColumnScrollbar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import kotlinx.coroutines.launch
@Composable
fun ColumnScrollbar(
state: ScrollState,
modifier: Modifier = Modifier,
rightSide: Boolean = true,
alwaysShowScrollBar: Boolean = false,
thickness: Dp = 6.dp,
Expand All @@ -65,7 +66,7 @@ fun ColumnScrollbar(
content: @Composable () -> Unit
) {
if (!enabled) content()
else BoxWithConstraints {
else BoxWithConstraints(modifier = modifier) {
content()
InternalColumnScrollbar(
state = state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import kotlin.math.floor
@Composable
fun LazyColumnScrollbar(
listState: LazyListState,
modifier: Modifier = Modifier,
rightSide: Boolean = true,
alwaysShowScrollBar: Boolean = false,
thickness: Dp = 6.dp,
Expand All @@ -67,7 +68,7 @@ fun LazyColumnScrollbar(
content: @Composable () -> Unit
) {
if (!enabled) content()
else Box {
else Box(modifier = modifier) {
content()
InternalLazyColumnScrollbar(
listState = listState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import kotlin.math.floor
@Composable
fun LazyGridVerticalScrollbar(
state: LazyGridState,
modifier: Modifier = Modifier,
rightSide: Boolean = true,
alwaysShowScrollBar: Boolean = false,
thickness: Dp = 6.dp,
Expand All @@ -65,7 +66,7 @@ fun LazyGridVerticalScrollbar(
content: @Composable () -> Unit
) {
if (!enabled) content()
else Box {
else Box(modifier = modifier) {
content()
InternalLazyGridVerticalScrollbar(
gridState = state,
Expand Down

0 comments on commit de93bf0

Please sign in to comment.