2020-11-20 01:59:16 +03:00
|
|
|
import { Box } from '@tlon/indigo-react';
|
2021-05-06 01:22:08 +03:00
|
|
|
import React, { Component } from 'react';
|
2020-10-24 02:25:44 +03:00
|
|
|
import Line from './line';
|
|
|
|
|
2020-05-01 05:54:12 +03:00
|
|
|
export class History extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2020-11-20 01:59:16 +03:00
|
|
|
<Box
|
|
|
|
height='100%'
|
2021-05-06 07:20:34 +03:00
|
|
|
minHeight={0}
|
|
|
|
minWidth={0}
|
2020-11-20 01:59:16 +03:00
|
|
|
display='flex'
|
|
|
|
flexDirection='column-reverse'
|
|
|
|
overflowY='scroll'
|
2020-06-09 23:13:56 +03:00
|
|
|
style={{ resize: 'none' }}
|
2020-05-01 05:54:12 +03:00
|
|
|
>
|
2020-11-20 01:59:16 +03:00
|
|
|
<Box
|
|
|
|
mt='auto'
|
|
|
|
>
|
2021-05-14 01:39:54 +03:00
|
|
|
{/* @ts-ignore declare props in later pass */}
|
2020-10-24 02:25:44 +03:00
|
|
|
{this.props.log.map((line, i) => {
|
2021-05-14 01:39:54 +03:00
|
|
|
// @ts-ignore react memo not passing props
|
2020-11-09 17:49:30 +03:00
|
|
|
return <Line key={i} line={line} />;
|
2020-05-01 05:54:12 +03:00
|
|
|
})}
|
2020-11-20 01:59:16 +03:00
|
|
|
</Box>
|
|
|
|
</Box>
|
2020-05-01 05:54:12 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default History;
|