blob: 102706ee355a7fdc7679c9dc4cc5a24a6c8d79b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package menu
import (
"github.com/charmbracelet/lipgloss"
"github.com/ewy1/pik/menu/style"
"strings"
)
var (
IconStyle = style.New(func() lipgloss.Style {
st := lipgloss.NewStyle().Width(2).Height(1)
return st
})
)
func Icon(input string) string {
return IconStyle.Render(input)
}
func PaddedIcon(input string) string {
if strings.TrimSpace(input) == "" {
return Icon(" ")
}
return Icon(input)
}
|