Add support for fake input in asciicast recordings

* Fixes a bug with `SelectionPrompt` and page size.
* Allow `IAnsiConsoleInput` to return `null`.
This commit is contained in:
Patrik Svensson
2021-05-24 02:36:14 +02:00
committed by Phil Scott
parent 46abadaccb
commit 450d87f5d3
56 changed files with 1314 additions and 1166 deletions

View File

@ -0,0 +1,21 @@
using Spectre.Console;
namespace Generator.Commands.Samples
{
internal class RuleSample : BaseSample
{
public override (int Cols, int Rows) ConsoleSize => (82, 10);
public override void Run(IAnsiConsole console)
{
console.Write(new Rule());
console.WriteLine();
console.Write(new Rule("[blue]Left aligned[/]").LeftAligned().RuleStyle("red"));
console.WriteLine();
console.Write(new Rule("[green]Centered[/]").Centered().RuleStyle("green"));
console.WriteLine();
console.Write(new Rule("[red]Right aligned[/]").RightAligned().RuleStyle("blue"));
console.WriteLine();
}
}
}