mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
refactor(table): remove uneeded extra args from NewFromTemplate
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ func DefaultStyles() Styles {
|
||||
|
||||
// NewFromTemplate lets you create a table [Model] from Lip Gloss'
|
||||
// [table.Table].
|
||||
func NewFromTemplate(t *table.Table, headers []string, rows [][]string) *Model {
|
||||
func NewFromTemplate(t *table.Table) *Model {
|
||||
return &Model{
|
||||
cursor: 0,
|
||||
KeyMap: DefaultKeyMap(),
|
||||
|
||||
+1
-1
@@ -364,7 +364,7 @@ func TestNewFromTemplate(t *testing.T) {
|
||||
return baseStyle.Foreground(lipgloss.Color("252"))
|
||||
})
|
||||
|
||||
bubblesTable := NewFromTemplate(lipglossTable, headers, pokemonData)
|
||||
bubblesTable := NewFromTemplate(lipglossTable)
|
||||
golden.RequireEqual(t, []byte(bubblesTable.View()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user