yattee/Shared/Playlists/CoverSectionRowView.swift
2021-08-20 00:38:31 +02:00

21 lines
438 B
Swift

import SwiftUI
struct CoverSectionRowView<ControlContent: View>: View {
let label: String?
let controlView: ControlContent
init(_ label: String? = nil, @ViewBuilder controlView: @escaping () -> ControlContent) {
self.label = label
self.controlView = controlView()
}
var body: some View {
HStack {
Text(label ?? "")
Spacer()
controlView
}
}
}