2021-07-07 22:39:18 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
2021-08-16 15:52:42 +00:00
|
|
|
struct CoverSectionRowView<ControlContent: View>: View {
|
2021-07-08 15:14:54 +00:00
|
|
|
let label: String?
|
2021-08-16 15:52:42 +00:00
|
|
|
let controlView: ControlContent
|
2021-07-07 22:39:18 +00:00
|
|
|
|
2021-08-16 15:52:42 +00:00
|
|
|
init(_ label: String? = nil, @ViewBuilder controlView: @escaping () -> ControlContent) {
|
2021-07-07 22:39:18 +00:00
|
|
|
self.label = label
|
|
|
|
self.controlView = controlView()
|
|
|
|
}
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
HStack {
|
2021-07-08 15:14:54 +00:00
|
|
|
Text(label ?? "")
|
2021-08-16 15:52:42 +00:00
|
|
|
|
2021-07-07 22:39:18 +00:00
|
|
|
Spacer()
|
|
|
|
controlView
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|