style: Rounded border

Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
This commit is contained in:
Tim Hårek Andreassen 2024-10-05 18:33:20 +02:00
parent bfbd031e41
commit 7435512ffb
No known key found for this signature in database
GPG key ID: E59C7734F0E10EB5

View file

@ -19,12 +19,10 @@ func New() *table.Table {
HeaderStyle = re.NewStyle().Foreground(white).Bold(true).Align(lipgloss.Center) HeaderStyle = re.NewStyle().Foreground(white).Bold(true).Align(lipgloss.Center)
CellStyle = re.NewStyle().Padding(0, 2) CellStyle = re.NewStyle().Padding(0, 2)
EvenRowStyle = CellStyle.Foreground(lightGray) EvenRowStyle = CellStyle.Foreground(lightGray)
BorderStyle = lipgloss.NewStyle().Foreground(white)
) )
t := table.New(). t := table.New().
Border(lipgloss.NormalBorder()). Border(lipgloss.RoundedBorder()).
BorderStyle(BorderStyle).
StyleFunc(func(row, col int) lipgloss.Style { StyleFunc(func(row, col int) lipgloss.Style {
switch { switch {
case row == 0: case row == 0: