15 lines
473 B
JavaScript
15 lines
473 B
JavaScript
import React from 'react';
|
|
import { Box, Text } from 'ink';
|
|
|
|
export function MemoSection({ latestMemo, width, height }) {
|
|
const lines = latestMemo.split('\n');
|
|
const maxLines = Math.max(height - 28, 4);
|
|
return (
|
|
<Box flexDirection="column" marginTop={1} width={width}>
|
|
<Text color="magenta">Liste de courses</Text>
|
|
{lines.slice(0, maxLines).map((line, index) => (
|
|
<Text key={index} wrap="truncate-end">{line}</Text>
|
|
))}
|
|
</Box>
|
|
);
|
|
} |