Skip to content

Commit 9236b68

Browse files
committed
chore(tree): update background color example
1 parent 68be6a5 commit 9236b68

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

examples/tree/background/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ import (
66
)
77

88
func main() {
9+
backgroundColor := lipgloss.Color("#ee6ff8")
10+
foregroundColor := lipgloss.Color("#ecfe65")
11+
912
darkBg := lipgloss.NewStyle().
10-
Background(lipgloss.Color("0")).
13+
Background(backgroundColor).
1114
Padding(0, 1)
1215

1316
headerItemStyle := lipgloss.NewStyle().
14-
Background(lipgloss.Color("#ee6ff8")).
15-
Foreground(lipgloss.Color("#ecfe65")).
17+
Foreground(foregroundColor).
1618
Bold(true).
1719
Padding(0, 1)
1820

19-
itemStyle := headerItemStyle.Background(lipgloss.Color("0"))
21+
itemStyle := headerItemStyle.Background(backgroundColor)
2022

2123
t := tree.Root("# Table of Contents").
2224
RootStyle(itemStyle).

0 commit comments

Comments
 (0)