view LazyBear/UI/HUD.swift @ 177:235ee168a9c3

Fix URL encoding bug clean company search list
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sun, 21 Feb 2021 17:38:02 +0100
parents
children c1aa75608c27
line wrap: on
line source

//
//  HUD.swift
//  LazyBear
//
//  Created by Dennis Concepción Martín on 21/2/21.
//

import SwiftUI

struct HUD: View {
    @ViewBuilder var body: some View {
        Text("Saved image")
            .foregroundColor(.gray)
            .padding(.horizontal, 10)
            .padding(14)
            .background(
                Blur(style: .systemMaterial)
                    .clipShape(Capsule())
                    .shadow(color: Color(.black).opacity(0.22), radius: 12, x: 0, y: 5)
            )
    }
}

struct Blur: UIViewRepresentable {
    var style: UIBlurEffect.Style
    
    func makeUIView(context: Context) -> UIVisualEffectView {
        return UIVisualEffectView(effect: UIBlurEffect(style: style))
    }
    
    func updateUIView(_ uiView: UIVisualEffectView, context: Context) {
        uiView.effect = UIBlurEffect(style: style)
    }
}