크리에이터 커뮤니티 페이지 추가
This commit is contained in:
40
SodaLive/Sources/CustomView/IconAndTitleButton.swift
Normal file
40
SodaLive/Sources/CustomView/IconAndTitleButton.swift
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// IconAndTitleButton.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2023/12/15.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct IconAndTitleButton: View {
|
||||
|
||||
let iconName: String
|
||||
let title: String
|
||||
let onClick: () -> Void
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 4) {
|
||||
Image(iconName)
|
||||
|
||||
Text(title)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "d2d2d2"))
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.vertical, 5.3)
|
||||
.background(Color(hex: "ffffff").opacity(0.1))
|
||||
.cornerRadius(26.7)
|
||||
.onTapGesture { onClick() }
|
||||
}
|
||||
}
|
||||
|
||||
struct IconAndTitleButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
IconAndTitleButton(
|
||||
iconName: "ic_audio_content_share",
|
||||
title: "공유",
|
||||
onClick: {}
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user