edit

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmEdit

func ConfirmEdit() tea.Msg

func DefaultKeyMap

func DefaultKeyMap() keys.KeyMap

func DefaultStyle

func DefaultStyle() textarea.Style

func Save

func Save() tea.Msg

func SaveEdit

func SaveEdit(save bool) tea.Cmd

func StartEditing

func StartEditing() tea.Msg

Types

type Component

type Component struct {
	reactea.BasicComponent
	reactea.BasicPropfulComponent[Props]

	KeyMap keys.KeyMap
	Prefix string
	// contains filtered or unexported fields
}

func New

func New() *Component

func (*Component) Init

func (c *Component) Init(props Props) tea.Cmd

func (*Component) Render

func (c *Component) Render(w, h int) string

func (*Component) Update

func (c *Component) Update(msg tea.Msg) tea.Cmd

type ConfirmEditMsg

type ConfirmEditMsg struct{}

type Props

type Props struct {
	Value    string
	Save     func(string)
	ShowHelp func([]map[string]string)
}

type SaveEditMsg

type SaveEditMsg struct{}

type StartEditingMsg

type StartEditingMsg struct{}

Jump to

Keyboard shortcuts

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