add initial stuff
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user