damus

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

DamusLightGradient.swift (746B)


      1 //
      2 //  DamusLightGradient.swift
      3 //  damus
      4 //
      5 //  Created by eric on 9/8/23.
      6 //
      7 
      8 import SwiftUI
      9 
     10 fileprivate let damus_grad_c1 = hex_col(r: 0xd3, g: 0x2d, b: 0xc3)
     11 fileprivate let damus_grad_c2 = hex_col(r: 0x33, g: 0xc5, b: 0xbc)
     12 fileprivate let damus_grad = [damus_grad_c1, damus_grad_c2]
     13 
     14 struct DamusLightGradient: View {
     15     var body: some View {
     16         DamusLightGradient.gradient
     17             .opacity(0.5)
     18             .edgesIgnoringSafeArea([.top,.bottom])
     19     }
     20 
     21     static var gradient: LinearGradient {
     22          LinearGradient(colors: damus_grad, startPoint: .topLeading, endPoint: .bottomTrailing)
     23     }
     24 }
     25 
     26 struct DamusLightGradient_Previews: PreviewProvider {
     27     static var previews: some View {
     28         DamusLightGradient()
     29     }
     30 }