mirror of
https://github.com/charmbracelet/gum.git
synced 2024-08-17 02:00:46 +03:00
fix: show header only if not empty
This commit is contained in:
parent
38521ff870
commit
bb103c0a03
@ -134,7 +134,10 @@ func (m model) View() string {
|
||||
}
|
||||
|
||||
view := m.textinput.View() + "\n" + m.viewport.View()
|
||||
return lipgloss.JoinVertical(lipgloss.Left, header, view)
|
||||
if m.header != "" {
|
||||
return lipgloss.JoinVertical(lipgloss.Left, header, view)
|
||||
}
|
||||
return view
|
||||
}
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
Loading…
Reference in New Issue
Block a user