subsonic-tui/internal/tui/views/button.go
Sagi Dayan 48661005be
initial commit
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-09-01 16:30:56 +03:00

21 lines
534 B
Go

package views
import (
"git.dayanhub.com/sagi/subsonic-tui/internal/config"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
func NewButton(label string) *tview.Button {
style := tcell.Style{}
inactiveS := style.Background(config.ColorButtonBg).
Foreground(config.ColorButtonTxt).Bold(true)
activeS := style.Background(config.ColorButtonSelectedBg).
Foreground(config.ColorButtonSelectedTxt).Bold(true).Underline(true)
b := tview.NewButton(label)
b.SetStyle(inactiveS)
b.SetActivatedStyle(activeS)
return b
}