mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-03-01 03:20:34 +00:00
Create LogsTerminal.tsx
This commit is contained in:
parent
419a16de98
commit
5400a4c9f5
32
src/pages/LogsPage/LogsTerminal.tsx
Normal file
32
src/pages/LogsPage/LogsTerminal.tsx
Normal 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;
|
Loading…
x
Reference in New Issue
Block a user