Fix receive and send
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { Box, Text, useInput, measureElement } from 'ink';
|
||||
import TextInput from 'ink-text-input';
|
||||
import TextInput from './TextInput.js';
|
||||
import { colors } from '../theme.js';
|
||||
|
||||
/**
|
||||
@@ -29,6 +29,7 @@ export function DialogWrapper({
|
||||
borderColor = colors.primary,
|
||||
children,
|
||||
width = 60,
|
||||
backgroundColor = colors.bg,
|
||||
}: DialogWrapperProps): React.ReactElement {
|
||||
const ref = useRef<any>(null);
|
||||
const [height, setHeight] = useState<number | null>(null);
|
||||
@@ -51,9 +52,12 @@ export function DialogWrapper({
|
||||
flexDirection="column"
|
||||
width={width}
|
||||
height={height}
|
||||
backgroundColor={backgroundColor}
|
||||
>
|
||||
{Array.from({ length: height }).map((_, i) => (
|
||||
<Text key={i}>{' '.repeat(width)}</Text>
|
||||
<Text key={i} backgroundColor={backgroundColor}>
|
||||
{' '.repeat(width)}
|
||||
</Text>
|
||||
))}
|
||||
</Box>
|
||||
)}
|
||||
@@ -67,6 +71,7 @@ export function DialogWrapper({
|
||||
paddingX={2}
|
||||
paddingY={1}
|
||||
width={width}
|
||||
backgroundColor={backgroundColor}
|
||||
>
|
||||
<Text color={borderColor} bold>
|
||||
{title}
|
||||
|
||||
Reference in New Issue
Block a user