widgets

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONViewModel

func NewJSONViewModel(
	content []byte,
	lastWindowSize tea.WindowSizeMsg,
	keyMap keymap.KeyMap,
) (tea.Model, tea.Cmd)

NewJSONViewModel creates a new JSON view widget if a content is the correct json, or plain text view otherwise.

Types

type PlainLogModel

type PlainLogModel struct {
	// contains filtered or unexported fields
}

PlainLogModel is a widget that shows multiline text in a viewport.

func NewPlainLogModel

func NewPlainLogModel(
	text string,
	windowSize tea.WindowSizeMsg,
	keyMap keymap.KeyMap,
) (PlainLogModel, tea.Cmd)

NewPlainLogModel initializes a new PlainLogModel with the given text. It updates a widget with the message `tea.WindowSizeMsg`.

func (PlainLogModel) Init

func (m PlainLogModel) Init() tea.Cmd

Init implements team.Model interface.

func (PlainLogModel) Update

func (m PlainLogModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements team.Model interface.

func (PlainLogModel) View

func (m PlainLogModel) View() string

View implements team.Model interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL