Allow custom instructions for prompts

Closes #229
This commit is contained in:
Patrik Svensson
2021-03-14 23:35:08 +01:00
committed by Phil Scott
parent 9502aaf2b9
commit c2bab0ebf8
9 changed files with 105 additions and 9 deletions

View File

@ -16,6 +16,10 @@ var fruits = AnsiConsole.Prompt(
.Title("What are your [green]favorite fruits[/]?")
.NotRequired() // Not required to have a favorite fruit
.PageSize(10)
.MoreChoicesText("[grey](Move up and down to reveal more fruits)[/]")
.InstructionsText(
"[grey](Press [blue]<space>[/] to toggle a fruit, " +
"[green]<enter>[/] to accept)[/]")
.AddChoice("Apple")
.AddChoices(new[] {
"Apricot", "Avocado",

View File

@ -15,6 +15,7 @@ var fruit = AnsiConsole.Prompt(
new SelectionPrompt<string>()
.Title("What's your [green]favorite fruit[/]?")
.PageSize(10)
.MoreChoicesText("[grey](Move up and down to reveal more fruits)[/]")
.AddChoice("Apple")
.AddChoices(new[] {
"Apricot", "Avocado",