import Adwaita import Foundation import LuminateCore public struct MediaRow: View { public var title: String public var items: [Components.Schemas.BaseItemDto] @Binding public var navigation: NavigationStack public var onSeeAll: (() -> Void)? public init( title: String, items: [Components.Schemas.BaseItemDto], navigation: Binding>, onSeeAll: (() -> Void)? = nil ) { self.title = title self.items = items _navigation = navigation self.onSeeAll = onSeeAll } public var view: Body { VStack(spacing: 16) { HStack { Text(title) .title3() /// Poor man's `Spacer()` Bin() .hexpand() if let onSeeAll { Button("See All") { onSeeAll() } } } ScrollView { ForEach(items, horizontal: true) { item in HomePosterCell(item: item) .padding(16, .trailing) } } .vscrollbarPolicy(.never) .hscrollbarPolicy(.external) } } }