add initial stuff

This commit is contained in:
Kujtim Hoxha
2025-03-23 19:19:08 +01:00
parent 796bbf4d66
commit 8daa6e774a
36 changed files with 1779 additions and 143 deletions

View File

@@ -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]