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.
34 lines
861 B
34 lines
861 B
//
|
|
// AllcoinsCounter.swift
|
|
// AllIn
|
|
//
|
|
// Created by Emre on 20/09/2023.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct AllcoinsCounter: View {
|
|
var backgroundColor: Color = .white
|
|
var foregroundColor: Color = AllInColors.primaryColor
|
|
var body: some View {
|
|
HStack(alignment: .center) {
|
|
Image("allcoinIcon")
|
|
.resizable()
|
|
.frame(width: 17, height: 17, alignment: .leading)
|
|
Text(String(AppStateContainer.shared.user?.nbCoins ?? 0))
|
|
.fontWeight(.black)
|
|
.foregroundColor(foregroundColor)
|
|
}
|
|
.frame(width: 90, height: 40)
|
|
.background(backgroundColor)
|
|
.cornerRadius(9999, corners: [.topLeft, .bottomLeft])
|
|
|
|
}
|
|
}
|
|
|
|
struct AllcoinsCounter_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
AllcoinsCounter()
|
|
}
|
|
}
|