Code review fixes for show question mark pr. (#18480)

This commit is contained in:
Jacob Richman
2026-02-06 22:35:14 -08:00
committed by GitHub
parent 6f1a5bf81d
commit a37844e5a1
11 changed files with 298 additions and 235 deletions
@@ -5,21 +5,23 @@
*/
import type React from 'react';
import { Text } from 'ink';
import { useTerminalSize } from '../../hooks/useTerminalSize.js';
import { Box } from 'ink';
import { theme } from '../../semantic-colors.js';
interface HorizontalLineProps {
width?: number;
color?: string;
}
export const HorizontalLine: React.FC<HorizontalLineProps> = ({
width,
color = theme.border.default,
}) => {
const { columns } = useTerminalSize();
const resolvedWidth = Math.max(1, width ?? columns);
return <Text color={color}>{'─'.repeat(resolvedWidth)}</Text>;
};
}) => (
<Box
width="100%"
borderStyle="single"
borderTop
borderBottom={false}
borderLeft={false}
borderRight={false}
borderColor={color}
/>
);