1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30
yattee/Shared/Playlists/CoverSectionRowView.swift

21 lines
438 B
Swift
Raw Normal View History

2021-07-08 04:09:18 +05:30
import SwiftUI
struct CoverSectionRowView<ControlContent: View>: View {
2021-07-08 20:44:54 +05:30
let label: String?
let controlView: ControlContent
2021-07-08 04:09:18 +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-07-08 04:09:18 +05:30
Spacer()
controlView
}
}
}