Skip to content

Commit

Permalink
[Paywalls V2] Scroll fix for background/padding/border (#4788)
Browse files Browse the repository at this point in the history
* A scroll fix for correct background/padding/border

* Fix lint
  • Loading branch information
joshdholtz authored Feb 14, 2025
1 parent 6331687 commit d2e9127
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ struct StackComponentView: View {
.applyIf(self.showActivityIndicatorOverContent, apply: { view in
view.progressOverlay(for: style.backgroundStyle)
})
.scrollableIfEnabled(
style.dimension,
enabled: style.scrollable ?? self.isScrollableByDefault
)
.shape(border: nil,
shape: style.shape,
background: style.backgroundStyle,
uiConfigProvider: self.viewModel.uiConfigProvider)
.apply(badge: style.badge, border: style.border, shadow: style.shadow, shape: style.shape)
.padding(style.margin)
.scrollableIfEnabled(
style.dimension,
enabled: style.scrollable ?? self.isScrollableByDefault
)
}

}
Expand Down Expand Up @@ -490,6 +490,12 @@ struct StackComponentView_Previews: PreviewProvider {
spacing: 10,
backgroundColor: .init(light: .hex("#ffcc00")),
padding: .init(top: 80, bottom: 80, leading: 20, trailing: 20),
margin: .init(top: 80, bottom: 80, leading: 20, trailing: 20),
shape: .rectangle(.init(topLeading: 20,
topTrailing: 20,
bottomLeading: 20,
bottomTrailing: 20)),
border: .init(color: .init(light: .hex("#0000ff")), width: 6),
overflow: .scroll
),
localizationProvider: .init(
Expand Down

0 comments on commit d2e9127

Please sign in to comment.