[WIP] table formatting
This commit is contained in:
@ -7,16 +7,19 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
// "github.com/charmbracelet/bubbles/table"
|
||||
"github.com/charmbracelet/huh"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"tasksquire/components/table"
|
||||
"tasksquire/taskwarrior"
|
||||
)
|
||||
|
||||
type Styles struct {
|
||||
Main lipgloss.Style
|
||||
|
||||
Form *huh.Theme
|
||||
Form *huh.Theme
|
||||
TableStyle table.Styles
|
||||
|
||||
Active lipgloss.Style
|
||||
Alternate lipgloss.Style
|
||||
@ -71,6 +74,13 @@ func NewStyles(config *taskwarrior.TWConfig) *Styles {
|
||||
styles := parseColors(config.GetConfig())
|
||||
styles.Main = lipgloss.NewStyle()
|
||||
|
||||
styles.TableStyle = table.Styles{
|
||||
// Header: lipgloss.NewStyle().Bold(true).Padding(0, 1).BorderBottom(true),
|
||||
Cell: lipgloss.NewStyle().Padding(0, 1, 0, 0),
|
||||
Header: lipgloss.NewStyle().Bold(true).Padding(0, 1, 0, 0).Underline(true),
|
||||
Selected: lipgloss.NewStyle().Foreground(styles.Active.GetForeground()).Background(styles.Active.GetBackground()).Bold(true).Reverse(true),
|
||||
}
|
||||
|
||||
formTheme := huh.ThemeBase()
|
||||
formTheme.Focused.Title = formTheme.Focused.Title.Bold(true)
|
||||
formTheme.Focused.SelectSelector = formTheme.Focused.SelectSelector.SetString("> ")
|
||||
|
||||
Reference in New Issue
Block a user