Luminate/Sources/LuminateHome/MediaRow.swift

33 lines
807 B
Swift

import Adwaita
import LuminateCore
struct MediaRow: View {
var title: String
var items: [Components.Schemas.BaseItemDto]
var client: JellyfinClient
var onSeeAll: (() -> Void)?
var view: Body {
VStack {
HStack {
Text(title)
.style("title-3")
if onSeeAll != nil {
Button("See All") {
onSeeAll?()
}
.style("flat")
}
}
.padding(10, .horizontal)
ScrollView(.horizontal) {
HStack {
ForEach(items) { item in
HomePosterCell(item: item, client: client)
}
}
}
}
}
}