summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/layout/border.go
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-03-23 19:19:08 +0100
committerKujtim Hoxha <[email protected]>2025-03-23 19:19:08 +0100
commit8daa6e774a6e02698c90392e7b2008542f789594 (patch)
tree8053fc1a4de87fc8dc3fd6e776577b0221c02ac5 /internal/tui/layout/border.go
parent796bbf4d66c0fc70e750c7f582019cb9a7298e59 (diff)
downloadopencode-8daa6e774a6e02698c90392e7b2008542f789594.tar.gz
opencode-8daa6e774a6e02698c90392e7b2008542f789594.zip
add initial stuff
Diffstat (limited to 'internal/tui/layout/border.go')
-rw-r--r--internal/tui/layout/border.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/tui/layout/border.go b/internal/tui/layout/border.go
index d1b334b32..a3c80396f 100644
--- a/internal/tui/layout/border.go
+++ b/internal/tui/layout/border.go
@@ -24,17 +24,20 @@ var (
InactivePreviewBorder = styles.Grey
)
-func Borderize(content string, active bool, embeddedText map[BorderPosition]string) string {
+func Borderize(content string, active bool, embeddedText map[BorderPosition]string, activeColor lipgloss.TerminalColor) string {
if embeddedText == nil {
embeddedText = make(map[BorderPosition]string)
}
+ if activeColor == nil {
+ activeColor = ActiveBorder
+ }
var (
thickness = map[bool]lipgloss.Border{
true: lipgloss.Border(lipgloss.ThickBorder()),
false: lipgloss.Border(lipgloss.NormalBorder()),
}
color = map[bool]lipgloss.TerminalColor{
- true: ActiveBorder,
+ true: activeColor,
false: InactivePreviewBorder,
}
border = thickness[active]