mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-05-02 09:35:04 +00:00
Move all TypeScript interfaces from component files to /lib/interfaces folder Move terminal utility functions to /lib/utils folder Update all component imports to use centralized interfaces and utilities Fix JSX.Element type to React.ReactElement in terminal utils This improves code organization and reduces duplication across components https://claude.ai/code/session_G4kZm
26 lines
666 B
TypeScript
26 lines
666 B
TypeScript
import React from 'react';
|
|
import { Box } from '@mui/material';
|
|
import '@xterm/xterm/css/xterm.css';
|
|
import { InteractiveTerminalProps } from '@/lib/interfaces/terminal';
|
|
|
|
export default function InteractiveTerminal({ terminalRef }: InteractiveTerminalProps) {
|
|
return (
|
|
<Box
|
|
ref={terminalRef}
|
|
sx={{
|
|
height: { xs: '400px', sm: '500px' },
|
|
backgroundColor: '#300A24',
|
|
borderRadius: '4px',
|
|
border: '1px solid #5E2750',
|
|
overflow: 'hidden',
|
|
'& .xterm': {
|
|
padding: '8px',
|
|
},
|
|
'& .xterm-viewport': {
|
|
backgroundColor: '#300A24 !important',
|
|
},
|
|
}}
|
|
/>
|
|
);
|
|
}
|