blob: 97e4d525e2bb387d780956127e2d233bc61cbb39 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import SwiftUI
struct DebugTextBlock: View {
let title: String
let content: String
var body: some View {
VStack(alignment: .leading, spacing: 8) {
Text(title)
.font(.caption.weight(.semibold))
.foregroundStyle(.secondary)
.textCase(.uppercase)
Text(content)
.font(.caption.monospaced())
.foregroundStyle(.primary)
.textSelection(.enabled)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(12)
.background(Color(.secondarySystemBackground), in: RoundedRectangle(cornerRadius: 12))
}
}
}
struct CopyConfirmationBadge: View {
let message: String
var body: some View {
HStack(spacing: 6) {
Image(systemName: "checkmark.circle.fill")
.font(.caption)
Text(message)
.font(.caption.weight(.medium))
}
.foregroundStyle(.white)
.padding(.horizontal, 12)
.padding(.vertical, 8)
.background(.green.gradient, in: Capsule())
}
}
|