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/TrendingBetCard.swift

67 lines
2.3 KiB

//
// TrendingBetCard.swift
// AllIn
//
// Created by Lucas on 21/09/2023.
//
import SwiftUI
struct TrendingBetCard: View {
var body: some View {
VStack(alignment: .leading) {
HStack {
Image("FireIcon")
.resizable()
.frame(width: 15, height: 15, alignment: .leading)
Text("Populaire")
.textStyle(weight: .medium, color: AllInColors.pinkAccentColor, size: 17)
}
.padding([.leading, .top], 10)
Text("Emre va réussir son TP de CI/CD mercredi?")
.textStyle(weight: .heavy, color: .white, size: 17)
.frame(height: 47)
.multilineTextAlignment(.leading)
.padding([.leading, .trailing], 33)
Spacer()
GeometryReader { geometry in
HStack(alignment: .center, spacing: 0) {
Text("12")
.textStyle(weight: .bold, color: AllInColors.pinkAccentColor, size: 14)
Text("joueurs")
.textStyle(weight: .regular, color: .white, size: 14)
.padding([.leading], 2)
Text("2.35k")
.textStyle(weight: .bold, color: AllInColors.pinkAccentColor, size: 14)
.padding([.leading], 10)
Text("points misés")
.textStyle(weight: .regular, color: .white, size: 14)
.padding([.leading], 2)
}
.padding([.leading, .bottom, .trailing], 10)
.frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
}
}
.frame(height: 127, alignment: .topLeading)
.background(AllInColors.primaryColor)
.overlay(
RoundedRectangle(cornerRadius: 20, style: .continuous)
.stroke(AllInColors.primaryGradient, lineWidth: 5)
)
.clipShape(RoundedRectangle(cornerRadius: 20, style: .continuous))
}
}
struct TrendingBetCard_Previews: PreviewProvider {
static var previews: some View {
TrendingBetCard()
}
}