From 43ce3d6a27c6e54a880b643d4de9f8ac7f578a85 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 11 May 2022 11:02:22 -0300 Subject: [PATCH] fix: improve error output style Signed-off-by: Carlos A Becker --- wishlist.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wishlist.go b/wishlist.go index 33b4e56..3082c72 100644 --- a/wishlist.go +++ b/wishlist.go @@ -120,13 +120,17 @@ func (m *ListModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, cmd } +var boldStyle = lipgloss.NewStyle().Bold(true) + // View comply with tea.Model interface. func (m *ListModel) View() string { if m.quitting { return "" } if m.err != nil { - return "something went wrong:" + m.err.Error() + "\npress q to quit" + return boldStyle.Render("Something went wrong:") + "\n\n" + + m.err.Error() + "\n\n" + + boldStyle.Render("Press 'q' to quit.") + "\n" } return docStyle.Render(m.list.View()) }