mirror of
https://github.com/charmbracelet/gum
synced 2024-06-03 06:12:19 +02:00
02e925ea57
This commit uses the embedded style struct for styling in all components. The most notable example is `gum write` where there are many styles that are used and composed for each component of the command.
14 lines
579 B
Go
14 lines
579 B
Go
package input
|
|
|
|
import "github.com/charmbracelet/gum/style"
|
|
|
|
// Options are the customization options for the input.
|
|
type Options struct {
|
|
Placeholder string `help:"Placeholder value" default:"Type something..."`
|
|
Prompt string `help:"Prompt to display" default:"> "`
|
|
PromptStyle style.Styles `embed:"" prefix:"prompt." set:"name=prompt"`
|
|
CursorStyle style.Styles `embed:"" prefix:"cursor." set:"defaultForeground=212" set:"name=cursor"`
|
|
Value string `help:"Initial value" default:""`
|
|
Width int `help:"Input width" default:"20"`
|
|
}
|