damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

PurpleBackdrop.swift (536B)


      1 //
      2 //  PurpleBackdrop.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2024-03-04.
      6 //
      7 
      8 import SwiftUI
      9 
     10 struct PurpleBackdrop<T: View>: View {
     11     @ViewBuilder let content: () -> T
     12     var body: some View {
     13         ZStack {
     14             Color.black
     15                 .edgesIgnoringSafeArea(.all)
     16 
     17             Image("purple-blue-gradient-1")
     18                 .resizable()
     19                 .edgesIgnoringSafeArea(.all)
     20 
     21             content()
     22         }
     23     }
     24 }
     25 
     26 #Preview {
     27     PurpleBackdrop {
     28         Text(verbatim: "Hello, World")
     29     }
     30 }