shrub/pkg/interface/webterm/components/history.tsx

36 lines
766 B
TypeScript
Raw Normal View History

2020-11-20 01:59:16 +03:00
import { Box } from '@tlon/indigo-react';
import React, { Component } from 'react';
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%'
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 */}
{this.props.log.map((line, i) => {
2021-05-14 01:39:54 +03:00
// @ts-ignore react memo not passing props
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;