You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Apple/Sources/AllInApp/AllIn/Components/ConfidentialityButton.swift

39 lines
971 B

//
// ConfidentialityButton.swift
// AllIn
//
// Created by Emre on 29/09/2023.
//
import SwiftUI
struct ConfidentialityButton: View {
var image: String
var text: String
var selected: Bool
var body: some View {
HStack() {
Image(selected ? image + "Icon" : image + "PurpleIcon")
.resizable()
.scaledToFit()
.padding(.vertical, 12)
Text(text)
.font(.system(size: 17))
.fontWeight(.bold)
.foregroundColor(selected ? .white : AllInColors.lightPurpleColor)
}
.frame(width: 110, height: 45)
.background(selected ? AllInColors.lightPurpleColor : AllInColors.componentBackgroundColor)
.cornerRadius(10)
}
}
struct ConfidentialityButton_Previews: PreviewProvider {
static var previews: some View {
ConfidentialityButton(image: "lock", text: "Privé", selected: true)
}
}