feat: add a Styler interface for styling bubbles

This change introduces a Styler interface that allows users to define
custom styles for bubbles. The interface is implemented by the StylerFunc
type, which is a function type that takes a boolean argument and returns
a value of any type.

This allows a user to define a custom StylerFunc that returns a custom
style for a bubble based on the background color of the terminal.
This commit is contained in:
Ayman Bagabas
2024-10-29 15:54:40 -04:00
parent db64e3cd78
commit 8fdc81c836
8 changed files with 34 additions and 33 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import (
)
func TestFullHelp(t *testing.T) {
m := New()
m := New(true)
m.FullSeparator = " | "
k := key.WithKeys("x")
kb := [][]key.Binding{