damus

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

DamusGradient.swift (796B)


      1 //
      2 //  DamusGradient.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-05-09.
      6 //
      7 
      8 import SwiftUI
      9 
     10 fileprivate let damus_grad_c1 = hex_col(r: 0x1c, g: 0x55, b: 0xff)
     11 fileprivate let damus_grad_c2 = hex_col(r: 0x7f, g: 0x35, b: 0xab)
     12 fileprivate let damus_grad_c3 = hex_col(r: 0xff, g: 0x0b, b: 0xd6)
     13 fileprivate let damus_grad = [damus_grad_c1, damus_grad_c2, damus_grad_c3]
     14 
     15 struct DamusGradient: View {
     16     var body: some View {
     17         DamusGradient.gradient
     18             .edgesIgnoringSafeArea([.top,.bottom])
     19     }
     20     
     21     static var gradient: LinearGradient {
     22          LinearGradient(colors: damus_grad, startPoint: .bottomLeading, endPoint: .topTrailing)
     23     }
     24 }
     25 
     26 struct DamusGradient_Previews: PreviewProvider {
     27     static var previews: some View {
     28         DamusGradient()
     29     }
     30 }