2021-07-08 04:09:18 +05:30
|
|
|
import SwiftUI
|
|
|
|
|
2021-08-16 21:22:42 +05:30
|
|
|
struct CoverSectionRowView<ControlContent: View>: View {
|
2021-07-08 20:44:54 +05:30
|
|
|
let label: String?
|
2021-08-16 21:22:42 +05:30
|
|
|
let controlView: ControlContent
|
2021-07-08 04:09:18 +05:30
|
|
|
|
2021-08-16 21:22:42 +05:30
|
|
|
init(_ label: String? = nil, @ViewBuilder controlView: @escaping () -> ControlContent) {
|
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-08-16 21:22:42 +05:30
|
|
|
|
2021-07-08 04:09:18 +05:30
|
|
|
Spacer()
|
|
|
|
controlView
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|