Create LogsTerminal.tsx

This commit is contained in:
Hristo Nedelkov 2023-11-03 12:12:27 +02:00
parent 419a16de98
commit 5400a4c9f5
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
import { LazyLog } from 'react-lazylog';
function LogsTerminal() {
const lineStyle = {
borderBottom: '1px solid #e0e0e0',
fontFamily: 'Courier New, monospace',
lineHeight: '1.5',
fontSize: '14px',
};
const oddLineStyle = {
...lineStyle,
backgroundColor: '#f7f7f7',
};
const lineContentStyle = {
color: '#333',
};
return (
<div>
<LazyLog
url="path_to_your_log_file.log"
lineStyle={(lineNumber: number) => lineNumber % 2 === 0 ? lineStyle : oddLineStyle}
textStyle={lineContentStyle}
/>
</div>
);
}
export default LogsTerminal;