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
747 B
34 lines
747 B
//
|
|
// OddCapsule.swift
|
|
// AllIn
|
|
//
|
|
// Created by Lucas Delanier on 03/02/2024.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
struct OddCapsule: View {
|
|
var backgroundColor: Color = AllInColors.purpleAccentColor
|
|
var foregroundColor: Color = AllInColors.whiteColor
|
|
var odd: Float = 0.0
|
|
var body: some View {
|
|
HStack(alignment: .center) {
|
|
Text("x\(odd.description)")
|
|
.fontWeight(.bold)
|
|
.foregroundColor(foregroundColor)
|
|
}
|
|
.padding(.horizontal, 10)
|
|
.padding(.vertical,5)
|
|
.background(backgroundColor)
|
|
.cornerRadius(9999)
|
|
|
|
}
|
|
}
|
|
|
|
struct OddCapsule_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
OddCapsule()
|
|
}
|
|
}
|