diff --git a/apps/videos/src/components/TerminalWindow.tsx b/apps/videos/src/components/TerminalWindow.tsx new file mode 100644 index 00000000..1323dc46 --- /dev/null +++ b/apps/videos/src/components/TerminalWindow.tsx @@ -0,0 +1,116 @@ +import type React from "react"; +import { FONT } from "@/lib/fonts"; + +const TRAFFIC_LIGHTS = [ + { color: "#ff5f57", key: "red" }, + { color: "#febc2e", key: "yellow" }, + { color: "#28c840", key: "green" }, +]; + +export const TerminalWindow: React.FC<{ + width: number; + height: number; + title?: string; + style?: React.CSSProperties; + children?: React.ReactNode; + /** Opacity for traffic light dots (0-1), used for morph transitions */ + dotsOpacity?: number; + /** Override top bar background color */ + topBarColor?: string; + /** Override body background color */ + bodyColor?: string; + /** Optional element to render in the title area instead of plain text */ + titleElement?: React.ReactNode; +}> = ({ + width, + height, + title = "Terminal", + style, + children, + dotsOpacity = 1, + topBarColor = "#1e1e2e", + bodyColor = "#0d1117", + titleElement, +}) => { + return ( +
+ {/* Top bar */} +
+ {/* Traffic light dots */} +
+ {TRAFFIC_LIGHTS.map((dot) => ( +
+ ))} +
+ + {/* Title area (centered) */} +
+ {titleElement || ( + + {title} + + )} +
+
+ + {/* Body */} +
+ {children} +
+
+ ); +};