35 lines
749 B
Swift
35 lines
749 B
Swift
//
|
|
// SelectedButtonView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2/23/24.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SelectedButtonView: View {
|
|
|
|
let title: String
|
|
let isSelected: Bool
|
|
|
|
var body: some View {
|
|
HStack(spacing: 6.7) {
|
|
if isSelected {
|
|
Image("ic_select_check")
|
|
}
|
|
|
|
Text(title)
|
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
|
.foregroundColor(isSelected ? .white : Color.button)
|
|
}
|
|
.padding(.vertical, 14.3)
|
|
.frame(maxWidth: .infinity)
|
|
.background(isSelected ? Color.button : Color.bg)
|
|
.cornerRadius(6.7)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
SelectedButtonView(title: "테스트", isSelected: true)
|
|
}
|