fix: remove custom pad method

Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
Chapman Pendery
2023-10-05 08:15:24 -07:00
parent 16d038dee3
commit 6f869932e0
+1 -5
View File
@@ -7,10 +7,6 @@ const DescriptionWidth = 30;
const BorderWidth = 2;
const ActiveSuggestionBackgroundColor = "#7D56F4";
const rightPad = (str: string, len: number) => {
return str + " ".repeat(len - str.length);
};
function Description({ description }: { description: string }) {
if (description.length !== 0) {
return (
@@ -46,7 +42,7 @@ function SuggestionList({
return (
<Box key={idx}>
<Text backgroundColor={bgColor} wrap="truncate-end">
{rightPad(name, SuggestionWidth - BorderWidth)}
{name.padEnd(SuggestionWidth - BorderWidth, " ")}
</Text>
</Box>
);