mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-07 05:36:11 +00:00
fix: allow to use empty style properly
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -1162,7 +1162,7 @@ func (m Model) statusView() string {
|
||||
}
|
||||
} else if len(m.items) == 0 {
|
||||
// Not filtering: no items.
|
||||
status = m.Styles.StatusEmpty.Render("No " + m.itemNamePlural)
|
||||
status = m.Styles.StatusEmpty.Render()
|
||||
} else {
|
||||
// Normal
|
||||
filtered := m.FilterState() == FilterApplied
|
||||
@@ -1217,7 +1217,7 @@ func (m Model) populatedView() string {
|
||||
if m.filterState == Filtering {
|
||||
return ""
|
||||
}
|
||||
return m.Styles.NoItems.Render("No " + m.itemNamePlural + ".")
|
||||
return m.Styles.NoItems.Render()
|
||||
}
|
||||
|
||||
if len(items) > 0 {
|
||||
|
||||
+2
-1
@@ -67,7 +67,8 @@ func DefaultStyles() (s Styles) {
|
||||
Foreground(lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"}).
|
||||
Padding(0, 0, 1, 2) //nolint:mnd
|
||||
|
||||
s.StatusEmpty = lipgloss.NewStyle().Foreground(subduedColor)
|
||||
s.StatusEmpty = lipgloss.NewStyle().Foreground(subduedColor).
|
||||
SetString("No items.")
|
||||
|
||||
s.StatusBarActiveFilter = lipgloss.NewStyle().
|
||||
Foreground(lipgloss.AdaptiveColor{Light: "#1a1a1a", Dark: "#dddddd"})
|
||||
|
||||
Reference in New Issue
Block a user