Apply Emil Kowalski design across all screens
Near-monochrome palette (ink tokens), black primary buttons, spring animations, 0.5pt hairline dividers, shadow cards, squircle corners. Replaces all blue/coloured accents. Adds ButtonStyles component. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,24 +2,21 @@ import SwiftUI
|
||||
|
||||
struct ProgressRing: View {
|
||||
let progress: Double
|
||||
var lineWidth: CGFloat = 14
|
||||
var lineWidth: CGFloat = 8
|
||||
var size: CGFloat = 200
|
||||
var color: Color = AppTheme.blue
|
||||
var backgroundColor: Color = Color(hex: "#E5E7EB")
|
||||
var color: Color = AppTheme.ink
|
||||
var backgroundColor: Color = Color(hex: "#EBEBEB")
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Circle()
|
||||
.stroke(backgroundColor, lineWidth: lineWidth)
|
||||
.stroke(backgroundColor, style: StrokeStyle(lineWidth: lineWidth, lineCap: .round))
|
||||
|
||||
Circle()
|
||||
.trim(from: 0, to: CGFloat(min(progress, 1.0)))
|
||||
.stroke(
|
||||
color,
|
||||
style: StrokeStyle(lineWidth: lineWidth, lineCap: .round)
|
||||
)
|
||||
.stroke(color, style: StrokeStyle(lineWidth: lineWidth, lineCap: .round))
|
||||
.rotationEffect(.degrees(-90))
|
||||
.animation(.easeInOut(duration: 0.4), value: progress)
|
||||
.animation(.spring(response: 0.5, dampingFraction: 0.8), value: progress)
|
||||
}
|
||||
.frame(width: size, height: size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user