mirror of
https://github.com/lumaa-dev/BubbleApp.git
synced 2024-12-11 08:57:58 +01:00
24 lines
518 B
Swift
24 lines
518 B
Swift
|
//Made by Lumaa
|
||
|
|
||
|
import SwiftUI
|
||
|
|
||
|
struct OnlineImage: View {
|
||
|
var url: URL
|
||
|
|
||
|
var body: some View {
|
||
|
AsyncImage(url: url) { element in
|
||
|
element
|
||
|
.resizable()
|
||
|
.scaledToFit()
|
||
|
.aspectRatio(1.0, contentMode: .fit)
|
||
|
} placeholder: {
|
||
|
Rectangle()
|
||
|
.fill(Color.gray)
|
||
|
.overlay {
|
||
|
ProgressView()
|
||
|
.progressViewStyle(.circular)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|