parent
38b104d059
commit
74f9d011e4
@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// GameResumeFrame.swift
|
||||||
|
// DouShouQi_App
|
||||||
|
//
|
||||||
|
// Created by Rémi REGNAULT on 21/05/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct GameResumeFrame: View {
|
||||||
|
|
||||||
|
// Players Params
|
||||||
|
let Player1Name: String
|
||||||
|
let Player2Name: String
|
||||||
|
|
||||||
|
// Game Params
|
||||||
|
let Status: String
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
ZStack {
|
||||||
|
HStack(alignment: .center) {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Text("\(Player1Name) vs \(Player2Name)")
|
||||||
|
.font(.headline)
|
||||||
|
|
||||||
|
Text(Status)
|
||||||
|
.font(.subheadline)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
Text("Detail >")
|
||||||
|
.frame(width: 100)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
}
|
||||||
|
|
||||||
|
.padding(10)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 3)
|
||||||
|
.stroke(.gray, lineWidth: 2)
|
||||||
|
)
|
||||||
|
}.padding(10)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct GameResumeFrame_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Remi", Status: "Winner: Remi")
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue