Co-authored-by: codex <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Yash Singh <[email protected]>
44 lines
1.3 KiB
Swift
44 lines
1.3 KiB
Swift
import ExpoModulesCore
|
|
|
|
public class T3TerminalModule: Module {
|
|
public func definition() -> ModuleDefinition {
|
|
Name("T3TerminalSurface")
|
|
|
|
View(T3TerminalView.self) {
|
|
Prop("terminalKey") { (view: T3TerminalView, terminalKey: String) in
|
|
view.terminalKey = terminalKey
|
|
}
|
|
|
|
Prop("initialBuffer") { (view: T3TerminalView, initialBuffer: String) in
|
|
view.initialBuffer = initialBuffer
|
|
}
|
|
|
|
Prop("fontSize") { (view: T3TerminalView, fontSize: Double) in
|
|
view.fontSize = CGFloat(fontSize)
|
|
}
|
|
|
|
Prop("appearanceScheme") { (view: T3TerminalView, appearanceScheme: String) in
|
|
view.appearanceScheme = appearanceScheme
|
|
}
|
|
|
|
Prop("themeConfig") { (view: T3TerminalView, themeConfig: String) in
|
|
view.themeConfig = themeConfig
|
|
}
|
|
|
|
Prop("backgroundColor") { (view: T3TerminalView, backgroundColor: String) in
|
|
view.backgroundColorHex = backgroundColor
|
|
}
|
|
|
|
Prop("foregroundColor") { (view: T3TerminalView, foregroundColor: String) in
|
|
view.foregroundColorHex = foregroundColor
|
|
}
|
|
|
|
Prop("mutedForegroundColor") { (view: T3TerminalView, mutedForegroundColor: String) in
|
|
view.mutedForegroundColorHex = mutedForegroundColor
|
|
}
|
|
|
|
Events("onInput", "onResize")
|
|
}
|
|
}
|
|
}
|