Documentation
¶
Overview ¶
package container provides ui to display any model conforming to container.content inside a container. The container shows the content with a predefined border and a title.
Index ¶
- type Content
- type Model
- func (m Model) Content() Content
- func (m Model) Init() tea.Cmd
- func (m Model) IsFocused() bool
- func (m Model) SetContent(content Content) Model
- func (m Model) SetSize(width, height int) Model
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) UpdateFocus(isFocused bool) (Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content interface { Init() tea.Cmd Update(msg tea.Msg) (Content, tea.Cmd) UpdateFocus(isFocused bool) (Content, tea.Cmd) View() string Title() string SetSize(width, height int) Content KeyMap() help.KeyMap }
Content is a interface that describes UI elements that can be displayed inside a container.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (Model) SetContent ¶
Click to show internal directories.
Click to hide internal directories.