-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(table): ANSI-aware cell example
- Loading branch information
1 parent
652c37d
commit 439c06f
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/charmbracelet/lipgloss" | ||
"github.com/charmbracelet/lipgloss/table" | ||
) | ||
|
||
func main() { | ||
s := lipgloss.NewStyle().Foreground(lipgloss.Color("240")).Render | ||
|
||
t := table.New() | ||
t.Row("Bubble Tea", s("Milky")) | ||
t.Row("Milk Tea", s("Also milky")) | ||
t.Row("Actual milk", s("Milky as well")) | ||
fmt.Println(t.Render()) | ||
} |