Skip to content

Commit d3786ce

Browse files
feat: multiselect styles
1 parent 1463088 commit d3786ce

3 files changed

Lines changed: 29 additions & 26 deletions

File tree

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React from "react";
2-
import { Box, Text } from "ink";
3-
import figures from "figures";
1+
import figures from 'figures'
2+
import { Box, Text } from 'ink'
3+
import React from 'react'
44

55
type CheckBoxProps = {
6-
isSelected: boolean;
7-
};
6+
isSelected: boolean
7+
}
88

99
const CheckBox = ({ isSelected = false }: CheckBoxProps) => (
1010
<Box marginRight={1}>
11-
<Text color="green">
11+
<Text color={isSelected ? 'green' : 'white'}>
1212
{isSelected ? figures.circleFilled : figures.circle}
1313
</Text>
1414
</Box>
15-
);
15+
)
1616

17-
export default CheckBox;
17+
export default CheckBox
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
import React from "react";
2-
import { Box, Text } from "ink";
3-
import figures from "figures";
1+
import figures from 'figures'
2+
import { Box, Text } from 'ink'
3+
import React from 'react'
44

55
type IndicatorProps = {
6-
isHighlighted: boolean;
7-
};
6+
isHighlighted: boolean
7+
}
88

99
const Indicator = ({ isHighlighted = false }: IndicatorProps) => (
1010
<Box marginRight={1}>
11-
<Text color={isHighlighted ? "blue" : undefined}>
12-
{isHighlighted ? figures.pointer : " "}
13-
</Text>
11+
<Text color={isHighlighted ? 'green' : undefined}>{isHighlighted ? figures.pointer : ' '}</Text>
1412
</Box>
15-
);
13+
)
1614

17-
export default Indicator;
15+
export default Indicator
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
import React from "react";
2-
import { Text } from "ink";
1+
import { Text } from 'ink'
2+
import React from 'react'
33

44
type ItemProps = {
5-
isHighlighted: boolean;
6-
label: string;
7-
};
5+
isHighlighted: boolean
6+
label: string
7+
}
88

99
const Item = ({ isHighlighted = false, label }: ItemProps) => (
10-
<Text color={isHighlighted ? "blue" : undefined}>{label}</Text>
11-
);
10+
<Text
11+
color={isHighlighted ? 'green' : 'white'}
12+
bold={isHighlighted}
13+
>
14+
{label}
15+
</Text>
16+
)
1217

13-
export default Item;
18+
export default Item

0 commit comments

Comments
 (0)