feat(table): add SetBorder function to set/unset borders

This commit is contained in:
bashbunni
2024-09-25 11:19:45 -07:00
parent cae042849c
commit b483f6dda9
2 changed files with 89 additions and 12 deletions
+2 -9
View File
@@ -150,15 +150,8 @@ func TestTableAlignment(t *testing.T) {
WithStyles(s),
)
// unset borders
// TODO I may need to expose this table OR have a helper func, they
// won't be able to do this outside of the library
biscuits.table.
BorderTop(false).
BorderBottom(false).
BorderLeft(false).
BorderRight(false).
BorderColumn(false)
// unset borders; hidden border leaves space.
biscuits.SetBorder(false)
got := ansi.Strip(biscuits.View())
golden.RequireEqual(t, []byte(got))
})