mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-13 05:23:13 +00:00
42 lines
571 B
TypeScript
42 lines
571 B
TypeScript
import React from 'react';
|
|
|
|
interface Props {
|
|
}
|
|
|
|
interface State {
|
|
lines: string[];
|
|
}
|
|
|
|
export default class Log extends React.Component<Props, State> {
|
|
state: State = {
|
|
lines: [
|
|
'here',
|
|
'is',
|
|
'a',
|
|
'line'
|
|
]
|
|
};
|
|
|
|
render() {
|
|
return (
|
|
<div className='log'>
|
|
{this.renderLines()}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
renderLines() {
|
|
|
|
const lines = [];
|
|
for (const line of this.state.lines) {
|
|
lines.push(<div className='log-row'>{line}</div>);
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
{lines}
|
|
</div>
|
|
);
|
|
}
|
|
}
|