Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

823 B
Raw Blame
import SwiftUI

struct CopyableLines: View {
    let caption: Text?
    let lines: [String]

    var body: some View {
        HStack(alignment: .bottom, spacing: 10) {
            VStack(alignment: .leading, spacing: 2) {
                if let caption {
                    caption
                        .font(.caption)
                        .foregroundStyle(.secondary)
                }
                Text(verbatim: lines.joined(separator: "\n"))
                    .font(.subheadline.monospaced())
                    .textSelection(.enabled)
                    .fixedSize(horizontal: false, vertical: true)
            }
            Spacer(minLength: 8)
            CopyButton(text: lines.joined(separator: "\n"))
                .buttonStyle(.bordered)
                .controlSize(.small)
        }
    }
}