aboutsummaryrefslogtreecommitdiff
path: root/Sources/NorgKeyboardToolbar/EditorSnippet+Presentation.swift
blob: f21916a9db1dadac340882f8c5c4bb31031decf6 (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
import Foundation

/// Extensions for how the toolbar buttons are presented.
extension EditorSnippet {

  /// Accessibility label for the toolbar button.
  public var label: String {
    switch self {
    case .heading: return "Heading"
    case .task: return "Task"
    case .weakReverse: return "Close one level"
    case .strongReverse: return "Close all levels"
    case .code: return "Code block"
    }
  }

  /// SF Symbol shown on the toolbar button.
  public var systemImage: String {
    switch self {
    case .heading: return "asterisk"
    case .task: return "checkmark.circle"
    case .weakReverse: return "chevron.left"
    case .strongReverse: return "chevron.left.2"
    case .code: return "chevron.left.forwardslash.chevron.right"
    }
  }
}