initial public release
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user