( choice: SelectChoice<A>, isSelected: boolean, renderOptions?: RenderOptions | undefined )
| 3184 | } |
| 3185 | |
| 3186 | const renderChoiceTitle = <A>( |
| 3187 | choice: SelectChoice<A>, |
| 3188 | isSelected: boolean, |
| 3189 | renderOptions?: RenderOptions | undefined |
| 3190 | ) => { |
| 3191 | if (renderOptions?.plain === true) { |
| 3192 | return choice.title |
| 3193 | } |
| 3194 | const title = choice.title |
| 3195 | if (isSelected) { |
| 3196 | return choice.disabled |
| 3197 | ? Ansi.annotate(title, Ansi.combine(Ansi.underlined, Ansi.blackBright)) |
| 3198 | : Ansi.annotate(title, Ansi.combine(Ansi.underlined, Ansi.cyanBright)) |
| 3199 | } |
| 3200 | return choice.disabled |
| 3201 | ? Ansi.annotate(title, Ansi.combine(Ansi.strikethrough, Ansi.blackBright)) |
| 3202 | : title |
| 3203 | } |
| 3204 | |
| 3205 | const renderSelectChoices = <A>( |
| 3206 | state: SelectState, |
no test coverage detected