/DynamicIsland

Display alerts in dynamic island.

Primary LanguageSwiftMIT LicenseMIT

DynamicIsland

WIP Swift Library to show in-app alerts in dynmaic island

import DynamicIsland
import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Button("Show Alert", systemImage: "bell.fill") {
                UIApplication.shared.inAppAlert {
                    DynamicAlert {
                        SmolView("leading")
                    } trailing: {
                        SmolView("trailing")
                    } center: {
                        SmolView("center", again: false)
                    } bottom: {
                        SmolView("bottom", again: false)
                    }
                }
            }
            .tint(.black)
            .buttonStyle(.borderedProminent)
            Spacer()
        }
    }
}