| 1 | import React from "react"; |
| 2 | import { createRoot } from "react-dom/client"; |
| 3 | import { AppearanceProvider } from "../src/appearance"; |
| 4 | import { TerminalView } from "../src/views"; |
| 5 | import "../src/style.css"; |
| 6 | |
| 7 | const root = createRoot(document.getElementById("terminal")); |
| 8 | window.showTestTerminal = (visible = true) => |
| 9 | root.render( |
| 10 | <AppearanceProvider> |
| 11 | <TerminalView |
| 12 | session={{ id: "image-test" }} |
| 13 | visible={visible} |
| 14 | onStatus={(text) => { |
| 15 | document.getElementById("status").textContent = text; |
| 16 | }} |
| 17 | /> |
| 18 | </AppearanceProvider>, |
| 19 | ); |
| 20 | window.showTestTerminal(); |