42 lines
1.0 KiB
Swift
42 lines
1.0 KiB
Swift
//
|
|
// LiveRoomTopCreatorView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/14.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
import Kingfisher
|
|
|
|
struct LiveRoomTopCreatorView: View {
|
|
|
|
var nickname: String
|
|
var profileImageUrl: String
|
|
var isFollowing: Bool
|
|
var onClickProfile: () -> Void
|
|
var onClickFollow: (Bool) -> Void
|
|
|
|
var body: some View {
|
|
HStack(spacing: 5.3) {
|
|
KFImage(URL(string: profileImageUrl))
|
|
.resizable()
|
|
.scaledToFill()
|
|
.frame(width: 33.3, height: 33.3)
|
|
.clipShape(Circle())
|
|
.onTapGesture { onClickProfile() }
|
|
|
|
Image("ic_crown")
|
|
|
|
Text(nickname)
|
|
.font(.custom(Font.light.rawValue, size: 12))
|
|
.foregroundColor(Color(hex: "eeeeee"))
|
|
|
|
Spacer()
|
|
|
|
Image(isFollowing ? "btn_following" : "btn_follow")
|
|
.onTapGesture { onClickFollow(isFollowing) }
|
|
}
|
|
}
|
|
}
|