forked from github/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctionCallMarkdownTheme.swift
More file actions
33 lines (32 loc) · 1.04 KB
/
FunctionCallMarkdownTheme.swift
File metadata and controls
33 lines (32 loc) · 1.04 KB
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
30
31
32
33
import Foundation
import MarkdownUI
import SwiftUI
extension MarkdownUI.Theme {
static func functionCall(fontSize: Double) -> MarkdownUI.Theme {
.gitHub.text {
ForegroundColor(.secondary)
BackgroundColor(Color.clear)
FontSize(fontSize - 1)
}
.list { configuration in
configuration.label
.markdownMargin(top: 4, bottom: 4)
}
.paragraph { configuration in
configuration.label
.markdownMargin(top: 0, bottom: 4)
}
.codeBlock { configuration in
configuration.label
.relativeLineSpacing(.em(0.225))
.markdownTextStyle {
FontFamilyVariant(.monospaced)
FontSize(.em(0.85))
}
.padding(16)
.background(Color(nsColor: .textBackgroundColor).opacity(0.7))
.clipShape(RoundedRectangle(cornerRadius: 6))
.markdownMargin(top: 4, bottom: 4)
}
}
}