mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-02 01:03:32 +01:00
Add AsciiCast demos for docs
This commit is contained in:
committed by
Patrik Svensson
parent
69fdae70c0
commit
46abadaccb
21
resources/scripts/Generator/Commands/Samples/RuleSample.cs
Normal file
21
resources/scripts/Generator/Commands/Samples/RuleSample.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user