Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxWidth = 120
)
Variables ¶
View Source
var ( ColorError = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#FF0000", Dark: "#FF0000"}) ColorSuccess = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "32", Dark: "42"}) ColorHelp = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#B2B2B2", Dark: "#4A4A4A"}) )
View Source
var DefaultStyles = &Styles{ Child: lipgloss.NewStyle().Padding(1, 0, 0, 0), Error: lipgloss.NewStyle().Inherit(ColorError).Padding(1, 0), Help: lipgloss.NewStyle().Padding(1, 0, 1, 2), Success: lipgloss.NewStyle().Inherit(ColorSuccess).Padding(1, 0), }
View Source
var MinimalKeyMap = func() *KeyMap { m := orderedmap.NewOrderedMap() m.Set("quit", key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "quit"), )) return &KeyMap{OrderedMap: m} }()
Functions ¶
Types ¶
type KeyMap ¶
type KeyMap struct {
*orderedmap.OrderedMap
}
type KeyMapProvider ¶
type KeyMapProvider interface {
KeyMap() *KeyMap
}
type ListModel ¶
type ListModel struct {
// contains filtered or unexported fields
}
func NewListModel ¶
func (ListModel) EditKeyMap ¶ added in v1.0.3
func (ListModel) TogglePrefixes ¶ added in v1.0.3
type Model ¶
type Model struct { Child tea.Model KeyMap *KeyMap Styles *Styles // contains filtered or unexported fields }
type StandaloneInputModel ¶
func NewStandaloneInputModel ¶
func NewStandaloneInputModel( inputParams prompt.InputParams, keyMap *KeyMap, styles *Styles, opts ...Option, ) StandaloneInputModel
func (StandaloneInputModel) Value ¶
func (m StandaloneInputModel) Value() (string, bool)
type StandaloneQuestionModel ¶
func NewStandaloneQuestionModel ¶
func NewStandaloneQuestionModel( text string, keyMap *KeyMap, styles *Styles, opts ...Option, ) StandaloneQuestionModel
func (StandaloneQuestionModel) Confirmed ¶
func (m StandaloneQuestionModel) Confirmed() bool
Click to show internal directories.
Click to hide internal directories.