damus

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

FriendIcon.swift (917B)


      1 //
      2 //  FriendIcon.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-04-20.
      6 //
      7 
      8 import SwiftUI
      9 
     10 struct FriendIcon: View {
     11     let friend: FriendType
     12     
     13     var body: some View {
     14         Group {
     15             switch friend {
     16             case .friend:
     17                 LINEAR_GRADIENT
     18                     .mask(Image(systemName: "person.fill.checkmark")
     19                         .resizable()
     20                     ).frame(width: 20, height: 14)
     21             case .fof:
     22                 Image(systemName: "person.fill.and.arrow.left.and.arrow.right")
     23                     .resizable()
     24                     .frame(width: 21, height: 14)
     25                     .foregroundColor(.gray)
     26             }
     27         }
     28     }
     29 }
     30 
     31 struct FriendIcon_Previews: PreviewProvider {
     32     static var previews: some View {
     33         VStack {
     34             FriendIcon(friend: .friend)
     35             
     36             FriendIcon(friend: .fof)
     37         }
     38     }
     39 }