28 lines
525 B
Go
28 lines
525 B
Go
package tui
|
|
|
|
import (
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
"github.com/charmbracelet/lipgloss"
|
|
)
|
|
|
|
type Placeholder struct {
|
|
title string
|
|
}
|
|
|
|
func NewPlaceholder(title string) tea.Model {
|
|
return &Placeholder{title: title}
|
|
}
|
|
|
|
func (p *Placeholder) Init() tea.Cmd {
|
|
return nil
|
|
}
|
|
|
|
func (p *Placeholder) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|
return p, nil
|
|
}
|
|
|
|
func (p *Placeholder) View() string {
|
|
style := lipgloss.NewStyle().Padding(2, 4).Foreground(lipgloss.Color("8"))
|
|
return style.Render("[WIP] " + p.title)
|
|
}
|