mirror of
https://github.com/charmbracelet/gum.git
synced 2024-11-05 05:46:36 +03: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.
16 lines
773 B
Go
16 lines
773 B
Go
package choose
|
|
|
|
import "github.com/charmbracelet/gum/style"
|
|
|
|
// Options is the customization options for the choose command.
|
|
type Options struct {
|
|
Options []string `arg:"" optional:"" help:"Options to choose from."`
|
|
|
|
Height int `help:"Height of the list" default:"10"`
|
|
HidePagination bool `help:"Hide pagination" default:"false"`
|
|
Indicator string `help:"Prefix to show on selected item" default:"> "`
|
|
IndicatorStyle style.Styles `embed:"" prefix:"indicator." set:"defaultForeground=212" set:"name=indicator"`
|
|
ItemStyle style.Styles `embed:"" prefix:"item." hidden:"" set:"defaultForeground=255" set:"name=item"`
|
|
SelectedStyle style.Styles `embed:"" prefix:"selected." set:"defaultForeground=212" set:"name=selected item"`
|
|
}
|