row style

This commit is contained in:
2025-12-28 19:02:00 +03:00
parent b13d113be6
commit 0be8937fea
6 changed files with 50 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
package image_table
import (
"image/color"
"image/png"
"log"
"os"
@@ -44,7 +45,10 @@ func TestDocument(t *testing.T) {
Header: []string{"ID", "Name", "Age"},
Rows: []any{
[]any{1, "Иван", 30},
[]any{2, "Пётр", 25},
&TableBlockStyle{
Cells: []any{2, "Пётр", 25},
BackgroundColor: color.RGBA{R: 225, G: 255, B: 225, A: 255},
},
},
},
{
@@ -52,7 +56,10 @@ func TestDocument(t *testing.T) {
Header: []string{"Метрика", "Значение"},
Rows: []any{
[]any{"Requests", 12000},
[]any{"Errors", 37},
&TableBlockStyle{
Cells: []any{"Errors", 37},
BackgroundColor: color.RGBA{R: 255, G: 225, B: 225, A: 255},
},
},
},
},