toggle

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package toggle ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *Config) (bool, error)

Run provides a shell script interface for prompting a user to confirm an action with an affirmative or negative answer.

Types

type Config

type Config struct {
	Question          string
	OkButtonLabel     string
	CancelButtonLabel string
	Cursor            string
	Divider           string
	// styles
	Styles Styles
}

Config represents the struct to configure the tui command.

type Styles

type Styles struct {
	PrefixIcon        string
	PrefixIconColor   lipgloss.AdaptiveColor
	QuestionStyle     lipgloss.Style
	ButtonStyle       lipgloss.Style
	ActiveButtonStyle lipgloss.Style
	DialogStyle       lipgloss.Style
	DividerStyle      lipgloss.Style
}

Styles is the struct representing the style configuration options.

func DefaultStyles

func DefaultStyles() (s Styles)

DefaultStyles sets the default styles theme.

Jump to

Keyboard shortcuts

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