Skip to content

Commit

Permalink
Add missing style for HorizontalScroll
Browse files Browse the repository at this point in the history
Summary: I noticed that we're missing style for HorizontalScroll.

Reviewed By: zielinskimz

Differential Revision: D67020097

fbshipit-source-id: ad667b14e6c89ee3cffd73ec7d864cb462077ced
  • Loading branch information
Andrew Wang authored and facebook-github-bot committed Dec 10, 2024
1 parent 1ade577 commit 9fe0eab
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package com.facebook.litho.kotlin.widget
import android.view.View
import com.facebook.litho.Component
import com.facebook.litho.ResourcesScope
import com.facebook.litho.Style
import com.facebook.litho.kotlinStyle
import com.facebook.litho.widget.HorizontalScroll
import com.facebook.litho.widget.HorizontalScrollEventsController
import com.facebook.rendercore.Dimen
Expand All @@ -34,6 +36,7 @@ inline fun ResourcesScope.HorizontalScroll(
noinline onScrollChange: ((View, scrollX: Int, oldScrollX: Int) -> Unit)? = null,
horizontalFadingEdgeEnabled: Boolean = false,
fadingEdgeLength: Int = 0,
style: Style? = null,
crossinline child: ResourcesScope.() -> Component
): HorizontalScroll =
HorizontalScroll.create(context)
Expand All @@ -46,4 +49,5 @@ inline fun ResourcesScope.HorizontalScroll(
.onScrollChangeListener(onScrollChange)
.horizontalFadingEdgeEnabled(horizontalFadingEdgeEnabled)
.fadingEdgeLength(fadingEdgeLength)
.kotlinStyle(style)
.build()

0 comments on commit 9fe0eab

Please sign in to comment.