multichoose

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ThemeDefault

func ThemeDefault(choices []string, cursor int, isSelected IsSelected) string

func ThemeDot

func ThemeDot(choices []string, cursor int, isSelected IsSelected) string

Types

type IsSelected

type IsSelected func(int) bool

type Model

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

func New

func New(choices []string, opts ...Option) *Model

func (Model) Data

func (m Model) Data() any

func (Model) DataString

func (m Model) DataString() string

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) KeyBindings

func (m Model) KeyBindings() []key.Binding

func (Model) Update

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

func (Model) UseKeyEnter

func (m Model) UseKeyEnter() bool

func (Model) UseKeyQ

func (m Model) UseKeyQ() bool

func (Model) View

func (m Model) View() string

type Option

type Option func(*Model)

func WithTheme

func WithTheme(theme Theme) Option

type Theme

type Theme func([]string, int, IsSelected) string

Jump to

Keyboard shortcuts

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