refactor into smaller units

This commit is contained in:
Rory Hinnen
2026-09-12 11:25:34 -05:00
parent 4eb7494d08
commit 1507f8b8c6
14 changed files with 637 additions and 415 deletions
+41
View File
@@ -0,0 +1,41 @@
//
// ButtonView.swift
// Bunch O' Dice
//
import SwiftUI
struct ButtonView: View {
let color: CGColor
let label: String
let value: Int
var body: some View {
let frameSize = 120.0
let fontSize = 35.0
let blurSize = 5.0
ZStack {
Circle()
.fill(Color(color))
.frame(width: frameSize, height: frameSize)
.blur(radius: blurSize)
VStack {
Text(String(value))
.fontWeight(.black)
Text(label)
.font(.system(size: 20))
}
}
.foregroundColor(.primary)
.font(.system(size: fontSize))
}
}
#Preview {
ButtonView(
color: CGColor(red: 1.0, green: 0.3, blue: 0.3, alpha: 1.0),
label: "Hits",
value: 12
)
}