File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
RubyEvents/components/carousel Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ struct EventCarousel: View {
4747}
4848
4949#Preview {
50- TalkCarousel (
50+ EventCarousel (
5151 title: " Test " ,
52- talks : Talk . samples ( ) ,
52+ events : Event . samples ( ) + Event . samples ( ) ,
5353 navigator: nil ,
5454 viewAllURL: nil
5555 )
Original file line number Diff line number Diff line change 88import SwiftUI
99import HotwireNative
1010
11- struct NoAnimationButtonStyle : ButtonStyle {
12- func makeBody( configuration: Configuration ) -> some View {
13- configuration. label
14- . scaleEffect ( configuration. isPressed ? 1 : 1 ) // No scaling
15- . animation ( nil , value: configuration. isPressed) // Disable animation
16- }
17- }
18-
19-
2011struct FeaturedCarousel : View {
2112 var events : [ Event ]
2213 var navigator : Navigator ?
@@ -31,13 +22,13 @@ struct FeaturedCarousel: View {
3122 event: event,
3223 navigator: navigator
3324 )
34- } . buttonStyle ( NoAnimationButtonStyle ( ) )
25+ }
3526 }
3627 }
3728 . tabViewStyle (
3829 PageTabViewStyle ( indexDisplayMode: . always)
3930 )
40- . animation ( . easeInOut , value: events)
31+ . animation ( . interactiveSpring , value: events)
4132 . edgesIgnoringSafeArea ( . all)
4233 }
4334}
You can’t perform that action at this time.
0 commit comments