From 0715ee64dcd62c123867569a88b7ffb6b4b9ba35 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:41:15 +0900 Subject: [PATCH] bold --- internal/io/ui.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/io/ui.go b/internal/io/ui.go index 01b6e10..c74ad8b 100644 --- a/internal/io/ui.go +++ b/internal/io/ui.go @@ -99,10 +99,12 @@ func (u *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (u *UI) View() string { + bold := color.New(color.Bold) + s := color.CyanString("? ") for _, header := range u.Headers { - s += color.New(color.Bold).Sprintln(header) + s += bold.Sprintln(header) } if u.isEntered { @@ -125,10 +127,10 @@ func (u *UI) View() string { cursor := " " // no cursor if u.Cursor == i { - cursor = color.CyanString(">") // cursor! + cursor = color.CyanString(bold.Sprint(">")) // cursor! } - checked := "[ ]" // not selected + checked := bold.Sprint("[ ]") // not selected if _, ok := u.Selected[i]; ok { checked = color.GreenString("[x]") // selected! }