blob: f5a6ec8fc3d3656ad17fc9f257bf2ff880a4741e (
plain)
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
|
import NorgKit
import SwiftUI
struct QuoteView: View {
@Environment(\.norgTheme) private var theme
let status: TaskStatus?
let content: [InlineSpan]
let line: Int
let onSetStatus: (Int, TaskStatus) -> Void
var body: some View {
HStack(alignment: .top, spacing: 8) {
RoundedRectangle(cornerRadius: 1.5)
.fill(theme.quoteBarColor)
.frame(width: 3)
if let status {
BlockTaskRow(
status: status, content: content, font: theme.body, line: line, onSetStatus: onSetStatus
)
} else {
NorgInlineText(spans: content)
.foregroundStyle(theme.quoteColor)
.italic()
}
}
.fixedSize(horizontal: false, vertical: true)
}
}
|