This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

19 lines
638 B
TypeScript

import React from "react";
import { useColor } from "../theme.ts";
import { Box, Text } from "ink";
import figures from "figures";
export const IndicatorComponent = React.memo(({ isSelected = false }: { isSelected?: boolean }) => {
const themeColor = useColor();
return <Box marginRight={1}>
{
isSelected ? <Text color={themeColor}>{figures.pointer}</Text> : <Text> </Text>
}
</Box>
});
export const ItemComponent = React.memo(({ isSelected = false, label }: { isSelected?: boolean, label: string }) => {
const themeColor = useColor();
return <Text color={isSelected ? themeColor : undefined}>{label}</Text>
});