Skip to content

Commit

Permalink
feat: Add colour to cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
provsalt committed Jan 1, 2025
1 parent af0284b commit 8362871
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/tui/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ func (m *Menu) View() string {
cursor := " "
if i == m.Cursor {
cursor = ">"
res.WriteString(fmt.Sprintf("%s %s\n", lipgloss.NewStyle().Foreground(lipgloss.Color("#7D56F4")).Render(cursor), item.Name))
} else {
res.WriteString(lipgloss.NewStyle().Faint(true).Render(cursor, item.Name))
}
res.WriteString(fmt.Sprintf("%s %s\n", cursor, item.Name))
}
helpStyle := lipgloss.NewStyle().Faint(true)
res.WriteString(helpStyle.Render("\nup/down: navigate • enter: select"))
Expand Down

0 comments on commit 8362871

Please sign in to comment.