Add border support for panels

Closes #11
This commit is contained in:
Patrik Svensson
2020-08-05 15:24:18 +02:00
committed by Patrik Svensson
parent 108e56c229
commit 6d197c5140
7 changed files with 38 additions and 21 deletions

View File

@@ -51,12 +51,18 @@ namespace Sample
// Nest some panels and text
AnsiConsole.Foreground = Color.Maroon;
AnsiConsole.Render(new Panel(new Panel(new Panel(new Panel(
Text.New(
"[underline]I[/] heard [underline on blue]you[/] like 📦\n\n\n\n" +
"So I put a 📦 in a 📦\nin a 📦 in a 📦\n\n" +
"😅",
foreground: Color.White), content: Justify.Center)))));
AnsiConsole.Render(
new Panel(
new Panel(
new Panel(
new Panel(
Text.New(
"[underline]I[/] heard [underline on blue]you[/] like 📦\n\n\n\n" +
"So I put a 📦 in a 📦\nin a 📦 in a 📦\n\n" +
"😅", foreground: Color.White),
content: Justify.Center,
border: BorderKind.Rounded))),
border: BorderKind.Ascii));
// Reset colors
AnsiConsole.ResetColors();