Documentation
¶
Overview ¶
Package confirm provides a simple confirmation dialog component
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InactiveButtonStyle = lipgloss.NewStyle(). Foreground(colors.InactiveButtonFg). Background(colors.InactiveButtonBg). Padding(buttonPadding...). Margin(buttonMargin...) )
View Source
var Keys = KeyMap{ Toggle: key.NewBinding( key.WithKeys("tab", "h", "l", "left", "right"), key.WithHelp("", "toggle"), ), Confirm: key.NewBinding( key.WithKeys("y"), key.WithHelp("y", "confirm"), ), Cancel: key.NewBinding( key.WithKeys("n"), key.WithHelp("n", "cancel"), ), Submit: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "submit"), ), ShortSession: key.NewBinding( key.WithKeys("s"), key.WithHelp("s", "short session"), ), Quit: key.NewBinding( key.WithKeys("ctrl+c", "q"), key.WithHelp("q", "quit"), ), }
Functions ¶
This section is empty.
Types ¶
type ChoiceMsg ¶ added in v0.8.1
type ChoiceMsg struct {
Choice ConfirmChoice
}
type ConfirmChoice ¶ added in v0.8.1
type ConfirmChoice int
const ( Confirm ConfirmChoice = iota Cancel ShortSession )
type KeyMap ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) HandleWindowResize ¶ added in v0.8.1
func (m *Model) HandleWindowResize(msg tea.WindowSizeMsg) tea.Cmd
Click to show internal directories.
Click to hide internal directories.