File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,17 @@ func handleLs() {
6262 Border (lipgloss .NormalBorder ()).
6363 BorderStyle (lipgloss .NewStyle ().Foreground (lipgloss .Color ("99" ))).
6464 StyleFunc (func (row , col int ) lipgloss.Style {
65- switch {
66- case row == - 1 :
65+ // style for table header row
66+ if row == - 1 {
6767 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("99" )).Bold (true ).Align (lipgloss .Center )
68- default :
69- {
70- if col == 1 {
71- return lipgloss .NewStyle ().Align (lipgloss .Center ).PaddingLeft (2 ).PaddingRight (2 ).Width (tw )
72- }
73- return lipgloss .NewStyle ().Align (lipgloss .Center ).PaddingLeft (2 ).PaddingRight (2 )
74- }
7568 }
69+
70+ // force title column to wrap by specifying terminal width
71+ if col == 1 {
72+ return lipgloss .NewStyle ().Align (lipgloss .Center ).PaddingLeft (2 ).PaddingRight (2 ).Width (tw )
73+ }
74+
75+ return lipgloss .NewStyle ().Align (lipgloss .Center ).PaddingLeft (2 ).PaddingRight (2 )
7676 }).
7777 Headers ("ID" , "TITLE" , "PROGRESS" ).
7878 Rows (rows ... ).Width (tw )
You can’t perform that action at this time.
0 commit comments