import NorgKit import SwiftUI /// Adapts any block with status to a NorgTaskView struct BlockTaskRow: View { @Environment(\.norgTheme) private var theme let status: TaskStatus let content: [InlineSpan] let font: Font let line: Int let onSetStatus: (Int, TaskStatus) -> Void var body: some View { NorgTaskView( status: status, text: AttributedString(norg: content, baseFont: font, theme: theme), font: font, onToggle: { onSetStatus(line, status == .done ? .undone : .done) }, onSetStatus: { onSetStatus(line, $0) } ) } }