41 lines
908 B
Swift
41 lines
908 B
Swift
//
|
|
// 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: {}
|
|
)
|
|
}
|
|
}
|