renderOption(cursor, v, i) { let title; if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); else title = cursor === i ? color.cyan().underline(v.title) : v.title; return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title }
renderOption(cursor, v, i, arrowIndicator) { const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' '; let title, desc; if (v.disabled) { title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); } else { title = cursor === i ? color.cyan().underline(v.title) : v.title; if (cursor === i && v.description) { desc = ` - ${v.description}`; if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) { desc = '\n' + wrap(v.description, { margin: prefix.length, width: this.out.columns }); } } } return prefix + title + color.gray(desc || ''); }
style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint) ].join(' '); title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix; } else { title = this.cursor === i ? color.cyan().underline(v.title) : v.title; this.outputText += `${prefix} ${title}${color.gray(desc)}\n`;