Skip to content

Commit

Permalink
nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
Opeyem1a committed Oct 20, 2024
1 parent 52b9c00 commit fbe9c53
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/commands/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ const styleMap: TextStyle[] = [
{ color: 'cyanBright' },
];

const Connectors = ({ connectors }: { connectors: DisplayElement[] }) => {
const DisplayElementText = ({ elements }: { elements: DisplayElement[] }) => {
return (
<>
{connectors.map((connector, index) => {
{elements.map((element, index) => {
const style = styleMap[index % styleMap.length] as TextStyle;
return (
<Text
key={`connector-${index}`}
key={`element-${index}`}
color={style.color}
dimColor={style.dimColor}
>
{connector.symbols}
{element.symbols}
</Text>
);
})}
Expand Down Expand Up @@ -79,8 +79,8 @@ export const List = () => {
] as TextStyle;
return (
<Text key={node.name}>
<Connectors
connectors={[
<DisplayElementText
elements={[
...node.prefix,
{
symbols:
Expand All @@ -103,11 +103,11 @@ export const List = () => {
);
};

type DisplayElement = {
interface DisplayElement {
symbols: string;
};

type DisplayNode = {
interface DisplayNode {
prefix: DisplayElement[];
suffix: DisplayElement[];
name: string;
Expand Down

0 comments on commit fbe9c53

Please sign in to comment.