DamusBackground.swift (591B)
1 // 2 // DamusBackground.swift 3 // damus 4 // 5 // Created by William Casarin on 2023-07-12. 6 // 7 8 import Foundation 9 import SwiftUI 10 11 struct DamusBackground: View { 12 let maxHeight: CGFloat 13 14 init(maxHeight: CGFloat = 250.0) { 15 self.maxHeight = maxHeight 16 } 17 18 var body: some View { 19 Image("login-header") 20 .resizable() 21 .frame(maxWidth: .infinity, maxHeight: maxHeight, alignment: .center) 22 .ignoresSafeArea() 23 } 24 } 25 26 struct DamusBackground_Previews: PreviewProvider { 27 static var previews: some View { 28 DamusBackground() 29 } 30 }