File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 99func main () {
1010
1111 c := inf .NewConfirm (
12+ confirm .WithPure (),
1213 confirm .WithDefaultYes (),
1314 //confirm.WithDisableOutputResult(),
1415 //confirm.WithPrompt("hello world?"),
Original file line number Diff line number Diff line change @@ -6,6 +6,18 @@ import (
66
77type Option func (confirm * Confirm )
88
9+ // WithPure do not use any beautification features,
10+ // any options you customize will be cleared
11+ func WithPure () Option {
12+ return func (i * Confirm ) {
13+ i .inner .FocusSymbolStyle = style .New ()
14+ i .inner .UnFocusSymbolStyle = style .New ()
15+ i .inner .FocusIntervalStyle = style .New ()
16+ i .inner .UnFocusIntervalStyle = style .New ()
17+ i .inner .ValueStyle = style .New ()
18+ }
19+ }
20+
921// WithDefaultYes the `confirm` default is no,
1022// adding this option will turn into yes.
1123func WithDefaultYes () Option {
You can’t perform that action at this time.
0 commit comments