룰렛 설정 개수에 따라 룰렛 프리셋 버튼 활성화/비활성화
This commit is contained in:
@@ -10,6 +10,7 @@ import SwiftUI
|
||||
struct SelectedButtonView: View {
|
||||
|
||||
let title: String
|
||||
let isActive: Bool
|
||||
let isSelected: Bool
|
||||
|
||||
var body: some View {
|
||||
@@ -20,15 +21,15 @@ struct SelectedButtonView: View {
|
||||
|
||||
Text(title)
|
||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||
.foregroundColor(isSelected ? .white : Color.button)
|
||||
.foregroundColor(!isActive ? Color.gray77 : isSelected ? .white : Color.button)
|
||||
}
|
||||
.padding(.vertical, 14.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(isSelected ? Color.button : Color.bg)
|
||||
.background(!isActive ? Color.gray55 : isSelected ? Color.button : Color.bg)
|
||||
.cornerRadius(6.7)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
SelectedButtonView(title: "테스트", isSelected: true)
|
||||
SelectedButtonView(title: "테스트", isActive: true, isSelected: true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user