New doc theme (#387)

This commit is contained in:
Phil Scott
2021-04-24 16:20:59 -04:00
committed by GitHub
parent b568098d5e
commit 2a9fbb1ee9
145 changed files with 197984 additions and 8746 deletions

View File

@ -6,12 +6,12 @@ RedirectFrom: prompt
Sometimes you want to get some input from the user, and for this
you can use the `Prompt<TResult>`.
<div class="alert alert-warning" role="alert">
<i class="fas fa-exclamation-triangle icon-web"></i> The use of prompts
<?# Alert ?>
The use of prompts
insides status or progress displays is not supported.
</div>
<?#/ Alert ?>
# Confirmation
## Confirmation
```csharp
if (!AnsiConsole.Confirm("Run example?"))
@ -24,7 +24,7 @@ if (!AnsiConsole.Confirm("Run example?"))
Run example? [y/n] (y): _
```
# Simple
## Simple
```csharp
// Ask for the user's name
@ -39,7 +39,7 @@ What's your name? Patrik
What's your age? 37
```
# Choices
## Choices
```csharp
var fruit = AnsiConsole.Prompt(
@ -55,7 +55,7 @@ var fruit = AnsiConsole.Prompt(
What's your favorite fruit? [Apple/Banana/Orange] (Orange): _
```
# Validation
## Validation
```csharp
var age = AnsiConsole.Prompt(
@ -79,7 +79,7 @@ Too high
What's the secret number? _
```
# Secrets
## Secrets
```csharp
var password = AnsiConsole.Prompt(
@ -92,7 +92,7 @@ var password = AnsiConsole.Prompt(
Enter password: ************_
```
# Optional
## Optional
```csharp
var color = AnsiConsole.Prompt(