25 lines
447 B
Swift
25 lines
447 B
Swift
import SwiftUI
|
|
import SFSafeSymbols
|
|
|
|
struct IconAndTextView: View {
|
|
|
|
let icon: SFSymbol
|
|
|
|
let text: String
|
|
|
|
var body: some View {
|
|
HStack {
|
|
Image(systemSymbol: icon)
|
|
.frame(width: 30)
|
|
Text(text)
|
|
Spacer()
|
|
}
|
|
}
|
|
}
|
|
|
|
struct IconAndTextView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
IconAndTextView(icon: .power, text: "Awake time")
|
|
}
|
|
}
|