Open History to see the last commit
1import ExpoModulesCore
2
3public class T3TerminalModule: Module {
4 public func definition() -> ModuleDefinition {
5 Name("T3TerminalSurface")
6
7 View(T3TerminalView.self) {
8 Prop("terminalKey") { (view: T3TerminalView, terminalKey: String) in
9 view.terminalKey = terminalKey
10 }
11
12 Prop("initialBuffer") { (view: T3TerminalView, initialBuffer: String) in
13 view.initialBuffer = initialBuffer
14 }
15
16 Prop("fontSize") { (view: T3TerminalView, fontSize: Double) in
17 view.fontSize = CGFloat(fontSize)
18 }
19
20 Prop("appearanceScheme") { (view: T3TerminalView, appearanceScheme: String) in
21 view.appearanceScheme = appearanceScheme
22 }
23
24 Prop("themeConfig") { (view: T3TerminalView, themeConfig: String) in
25 view.themeConfig = themeConfig
26 }
27
28 Prop("backgroundColor") { (view: T3TerminalView, backgroundColor: String) in
29 view.backgroundColorHex = backgroundColor
30 }
31
32 Prop("foregroundColor") { (view: T3TerminalView, foregroundColor: String) in
33 view.foregroundColorHex = foregroundColor
34 }
35
36 Prop("mutedForegroundColor") { (view: T3TerminalView, mutedForegroundColor: String) in
37 view.mutedForegroundColorHex = mutedForegroundColor
38 }
39
40 Events("onInput", "onResize")
41 }
42 }
43}