From 657aa83a5ca24dc35572c040df64a0abb85e8612 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 15 Jun 2026 14:35:36 +0200 Subject: Initial extraction from Norganize --- Sources/NorgUI/Views/VerbatimBlock.swift | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Sources/NorgUI/Views/VerbatimBlock.swift (limited to 'Sources/NorgUI/Views/VerbatimBlock.swift') diff --git a/Sources/NorgUI/Views/VerbatimBlock.swift b/Sources/NorgUI/Views/VerbatimBlock.swift new file mode 100644 index 0000000..722c3f3 --- /dev/null +++ b/Sources/NorgUI/Views/VerbatimBlock.swift @@ -0,0 +1,23 @@ +import SwiftUI + +struct VerbatimBlock: View { + @Environment(\.norgTheme) private var theme + + let label: String? + let content: String + + var body: some View { + VStack(alignment: .leading, spacing: 4) { + if let label, !label.isEmpty { + Text(label) + .font(.caption2) + .foregroundStyle(.secondary) + } + Text(content) + .font(theme.codeFont) + .frame(maxWidth: .infinity, alignment: .leading) + } + .padding(10) + .background(theme.codeBackground, in: RoundedRectangle(cornerRadius: 8)) + } +} -- cgit