mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-01 16:59:37 +01:00
Add support for markup text in panel header
This commit is contained in:
committed by
Patrik Svensson
parent
be3350a411
commit
b1da5e7ba8
@@ -316,14 +316,14 @@ namespace Spectre.Console.Tests.Unit
|
||||
var panel = new Panel(grid)
|
||||
.Expand().RoundedBorder()
|
||||
.BorderStyle(new Style().Foreground(Color.Grey))
|
||||
.Header("Short paths ", new Style().Foreground(Color.Grey));
|
||||
.Header("[grey]Short paths[/]");
|
||||
|
||||
// When
|
||||
console.Render(panel);
|
||||
|
||||
// Then
|
||||
console.Lines.Count.ShouldBe(4);
|
||||
console.Lines[0].ShouldBe("╭─Short paths ─────────────────────────────────────────────────────────────────────╮");
|
||||
console.Lines[0].ShouldBe("╭─Short paths──────────────────────────────────────────────────────────────────────╮");
|
||||
console.Lines[1].ShouldBe("│ at System.Runtime.CompilerServices.TaskAwaiter. │");
|
||||
console.Lines[2].ShouldBe("│ HandleNonSuccessAndDebuggerNotification(Task task) │");
|
||||
console.Lines[3].ShouldBe("╰──────────────────────────────────────────────────────────────────────────────────╯");
|
||||
|
||||
Reference in New Issue
Block a user