mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-18 21:08:15 +08:00
Add JSON text renderer (#1086)
* Add JsonText widget to render highlighted JSON Closes #1051
This commit is contained in:
@ -10,11 +10,11 @@ namespace Generator.Commands.Samples
|
||||
{
|
||||
console.Write(new Rule());
|
||||
console.WriteLine();
|
||||
console.Write(new Rule("[blue]Left aligned[/]").LeftAligned().RuleStyle("red"));
|
||||
console.Write(new Rule("[blue]Left aligned[/]").LeftJustified().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.Write(new Rule("[red]Right aligned[/]").RightJustified().RuleStyle("blue"));
|
||||
console.WriteLine();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user