NetNewsWire/Multiplatform/Shared/Images/IconImageView.swift

28 lines
523 B
Swift
Raw Normal View History

2020-06-30 03:09:11 +02:00
//
// IconImageView.swift
// NetNewsWire
//
// Created by Maurice Parker on 6/29/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import SwiftUI
struct IconImageView: View {
var iconImage: IconImage
var body: some View {
2020-07-01 23:33:07 +02:00
return Image(rsImage: iconImage.image)
2020-06-30 03:09:11 +02:00
.resizable()
.scaledToFit()
.cornerRadius(4)
}
}
struct IconImageView_Previews: PreviewProvider {
static var previews: some View {
IconImageView(iconImage: IconImage(AppAssets.faviconTemplateImage))
}
}