-
-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to configure the style of the choices list and the default…
… value in TextPrompt (#681) * Allow setting the style of the default value in TextPrompt Add property "DefaultValueStyle" to TextPrompt which allows setting the style in which the default value is rendered. When no style is set, the value is displayed as green text, keeping the existing behavior. * Allow setting the style in which a TextPrompt's choices are displayed Add property "ChoicesStyle" to TextPrompt which allows setting the style in the prompt's choices are rendered. When no style is set, choices are displayed as blue text, keeping the existing behavior.
- Loading branch information
Showing
7 changed files
with
158 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/Spectre.Console.Tests/Expectations/Prompts/Text/ChoicesStyleNotSet.Output.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Enter Value: [38;5;12m[Choice 1/Choice 2][0m: Choice 2 |
1 change: 1 addition & 0 deletions
1
test/Spectre.Console.Tests/Expectations/Prompts/Text/ChoicesStyleSet.Output.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Enter Value: [38;5;9m[Choice 1/Choice 2][0m: Choice 2 |
1 change: 1 addition & 0 deletions
1
...ectre.Console.Tests/Expectations/Prompts/Text/DefaultValueStyleNotSet.Output.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Enter Value: [38;5;2m(default)[0m: Input |
1 change: 1 addition & 0 deletions
1
.../Spectre.Console.Tests/Expectations/Prompts/Text/DefaultValueStyleSet.Output.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Enter Value: [38;5;9m(default)[0m: Input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters