File tree Expand file tree Collapse file tree
source/import/Multiselect/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
55type CheckBoxProps = {
6- isSelected : boolean ;
7- } ;
6+ isSelected : boolean
7+ }
88
99const 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
Original file line number Diff line number Diff line change 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
55type IndicatorProps = {
6- isHighlighted : boolean ;
7- } ;
6+ isHighlighted : boolean
7+ }
88
99const 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
Original file line number Diff line number Diff line change 1- import React from "react" ;
2- import { Text } from "ink" ;
1+ import { Text } from 'ink'
2+ import React from 'react'
33
44type ItemProps = {
5- isHighlighted : boolean ;
6- label : string ;
7- } ;
5+ isHighlighted : boolean
6+ label : string
7+ }
88
99const 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
You can’t perform that action at this time.
0 commit comments