mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Add support for markdown tables
Closes #85 * Split Border into BoxBorder and TableBorder * Change how different table parts are composed * Add markdown table border
This commit is contained in:

committed by
Patrik Svensson

parent
697273917e
commit
93ec7401c8
@ -4,16 +4,30 @@ Order: 2
|
||||
|
||||
There is different built-in borders you can use for tables and panels.
|
||||
|
||||
# Built-in borders
|
||||
# Table borders
|
||||
|
||||
<img src="../assets/images/borders.png" style="max-width: 100%;">
|
||||
<img src="../assets/images/borders/table.png" style="max-width: 100%;">
|
||||
|
||||
# Usage
|
||||
## Example
|
||||
|
||||
To create a table and set it's border to `SimpleHeavy` as seen in the
|
||||
image above:
|
||||
To set a table border to `SimpleHeavy`:
|
||||
|
||||
```csharp
|
||||
var table = new Table();
|
||||
table.Border = Border.SimpleHeavy;
|
||||
table.Border = TableBorder.SimpleHeavy;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Panel borders
|
||||
|
||||
<img src="../assets/images/borders/panel.png" style="max-width: 100%;">
|
||||
|
||||
## Example
|
||||
|
||||
To set a panel border to `Rounded`:
|
||||
|
||||
```csharp
|
||||
var panel = new Panel("Hello World");
|
||||
panel.Border = BoxBorder.Rounded;
|
||||
```
|
Binary file not shown.
Before Width: | Height: | Size: 415 KiB |
BIN
docs/input/assets/images/borders/panel.png
Normal file
BIN
docs/input/assets/images/borders/panel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 KiB |
BIN
docs/input/assets/images/borders/table.png
Normal file
BIN
docs/input/assets/images/borders/table.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 503 KiB |
Reference in New Issue
Block a user