Add Padding extension

Add extension method for specifying horizontal and vertical padding.
Similar constructor for `Padding` already existed.

Update documentation for table column appearance (padding).

Update
`Should_Render_Padded_Object_Correctly_When_Nested_Within_Other_Object`
test to use new extension method.
This commit is contained in:
Martin Andersen
2020-10-26 20:41:49 +01:00
committed by Patrik Svensson
parent 9915a0d6a8
commit bca1c889d1
3 changed files with 23 additions and 5 deletions

View File

@ -109,12 +109,16 @@ table.Columns[0].RightAligned();
## Padding
```csharp
// Set left and right padding
table.Columns[0].Padding(left: 3, right: 5);
// Set padding individually
table.Columns[0].PadLeft(3);
table.Columns[0].PadRight(5);
// Or chained together
table.Columns[0].PadLeft(3).PadRight(5);
// Or with the shorthand method if the left and right
// padding are identical. Vertical padding is ignored.
table.Columns[0].Padding(4, 0);
```
## Disable column wrapping