spectreconsole / spectre.console

A .NET library that makes it easier to create beautiful console applications.
https://spectreconsole.net
MIT License
8.92k stars 454 forks source link

Update table documentation example demonstrating cell borders #1502

Open camelback opened 3 months ago

camelback commented 3 months ago

Is your feature request related to a problem? Please describe.

No, this is a documentation only update that I believe deserves in the main table example based on the assumption that table cells should have borders. Of course, this is my personal opinion, but I believe the example table demonstrating the capability is warranted.

Describe the solution you'd like

Update ../docs/input/widgets/table.md:

// Create a table 
var table = new Table(); 

// Add table cell borders
table.ShowRowSeparators();

// Add some columns 
table.AddColumn("Foo"); 
table.AddColumn(new TableColumn("Bar").Centered()); 

// Add some rows
table.AddRow("Baz", "[green]Qux[/]");
table.AddRow(new Markup("[blue]Corgi[/]"), new Panel("Waldo"));

// Render the table to the console
AnsiConsole.Write(table);

Additional context

An update image should also be included to reflect how the borders are rendered.


Please upvote :+1: this issue if you are interested in it.