Skip to content

Commit

Permalink
fix(table): examples
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Oct 5, 2023
1 parent 988c4eb commit ac00ad4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/table/chess/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func main() {
Border(lipgloss.NormalBorder()).
BorderRow(true).
BorderColumn(true).
Rows(table.Rows(board...)).
Rows(board...).
StyleFunc(func(row, col int) lipgloss.Style {
return lipgloss.NewStyle().Padding(0, 1)
})
Expand Down
2 changes: 1 addition & 1 deletion examples/table/languages/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
return style
}).
Headers("LANGUAGE", "FORMAL", "INFORMAL").
Rows(table.Rows(rows...)).
Rows(rows...).
Width(18)

fmt.Println(t)
Expand Down
2 changes: 1 addition & 1 deletion examples/table/mindy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {

t := table.New().
Border(lipgloss.HiddenBorder()).
Rows(table.Rows(data...)).
Rows(data...).
StyleFunc(func(row, col int) lipgloss.Style {
color := lipgloss.Color(fmt.Sprint(data[row-1][col-col%2]))
switch {
Expand Down
2 changes: 1 addition & 1 deletion examples/table/pokemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func main() {
BorderStyle(re.NewStyle().Foreground(lipgloss.Color("238"))).
Headers(CapitalizeHeaders(headers)...).
Width(80).
Rows(table.Rows(data...)).
Rows(data...).
StyleFunc(func(row, col int) lipgloss.Style {
if row == 0 {
return headerStyle
Expand Down

0 comments on commit ac00ad4

Please sign in to comment.