CHResume/ResumeBuilder/Generic Elements/RightImageLabel.swift

29 lines
582 B
Swift
Raw Normal View History

2023-08-18 22:47:24 +02:00
import SwiftUI
import SFSafeSymbols
struct RightImageLabel: View {
let text: String
let systemSymbol: SFSymbol
init(_ text: String, systemSymbol: SFSymbol) {
self.text = text
self.systemSymbol = systemSymbol
}
var body: some View {
HStack(spacing: 0) {
Image(systemSymbol: systemSymbol)
.frame(width: 20)
Text(text)
}
}
}
struct RightImageLabel_Previews: PreviewProvider {
static var previews: some View {
RightImageLabel("Home address", systemSymbol: .house)
}
}