mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 16:18:22 +00:00
20 lines
396 B
Swift
20 lines
396 B
Swift
|
import SwiftUI
|
||
|
|
||
|
struct OptionRowView<Content: View>: View {
|
||
|
let label: String
|
||
|
let controlView: Content
|
||
|
|
||
|
init(_ label: String, @ViewBuilder controlView: @escaping () -> Content) {
|
||
|
self.label = label
|
||
|
self.controlView = controlView()
|
||
|
}
|
||
|
|
||
|
var body: some View {
|
||
|
HStack {
|
||
|
Text(label)
|
||
|
Spacer()
|
||
|
controlView
|
||
|
}
|
||
|
}
|
||
|
}
|