diff --git a/table/table.go b/table/table.go index 3684167..b5b6551 100644 --- a/table/table.go +++ b/table/table.go @@ -124,6 +124,7 @@ type Styles struct { // DefaultStyles returns a set of default style definitions for this table. func DefaultStyles() Styles { return Styles{ + Border: lipgloss.NormalBorder(), BorderHeader: true, Selected: lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("212")), Header: lipgloss.NewStyle().Bold(true).Padding(0, 1), diff --git a/table/table_test.go b/table/table_test.go index 80c6bc2..1765049 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -61,15 +61,10 @@ func deepEqual(a, b []Row) bool { return true } -// func TestWithColumns(t *testing.T) { -// t.Run("With columns") -// -// t.Run("set headers directly") -// } - func TestTableAlignment(t *testing.T) { t.Run("No border", func(t *testing.T) { s := DefaultStyles() + s.Border = lipgloss.HiddenBorder() s.BorderHeader = false biscuits := New( WithHeight(5), @@ -89,10 +84,6 @@ func TestTableAlignment(t *testing.T) { golden.RequireEqual(t, []byte(got)) }) t.Run("With border", func(t *testing.T) { - s := DefaultStyles() - s.Border = lipgloss.NormalBorder() - s.BorderStyle = lipgloss.NewStyle().BorderForeground(lipgloss.Color("240")) - biscuits := New( WithHeight(5), WithColumns([]Column{ @@ -105,7 +96,7 @@ func TestTableAlignment(t *testing.T) { {"Tim Tams", "Australia", "No"}, {"Hobnobs", "UK", "Yes"}, }), - WithStyles(s), + WithStyles(DefaultStyles()), ) got := ansi.Strip(biscuits.View()) golden.RequireEqual(t, []byte(got))