1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 23:00:32 +05:30
yattee/Apple TV/CoverSectionRowView.swift

20 lines
416 B
Swift
Raw Normal View History

2021-07-08 04:09:18 +05:30
import SwiftUI
2021-07-08 20:44:54 +05:30
struct CoverSectionRowView<Content: View>: View {
let label: String?
2021-07-08 04:09:18 +05:30
let controlView: Content
2021-07-08 20:44:54 +05:30
init(_ label: String? = nil, @ViewBuilder controlView: @escaping () -> Content) {
2021-07-08 04:09:18 +05:30
self.label = label
self.controlView = controlView()
}
var body: some View {
HStack {
2021-07-08 20:44:54 +05:30
Text(label ?? "")
2021-07-08 04:09:18 +05:30
Spacer()
controlView
}
}
}