Description
This function that wraps a spectre renderable item in padding.
See https://spectreconsole.net/widgets/padder for more information.
Examples
Example 1
This example demonstrates how to pad an item with a padding of 1 on all sides
"Item to pad" | Format-SpectrePadded -Padding 1 | Format-SpectrePanel
Example 2
This example demonstrates how to pad an item with a padding of 4 on all sides
"Item to pad" | Format-SpectrePadded -Padding 4 | Format-SpectrePanel
Example 3
This example demonstrates how to pad an item with different padding on each side.
"Item to pad" | Format-SpectrePadded -Top 4 -Left 10 -Right 1 -Bottom 1 | Format-SpectrePanel
Parameters
Data
A renderable item to wrap in padding.
Type | Required | Position | PipelineInput |
---|
[Object] | true | named | true (ByValue) |
Padding
Type | Required | Position | PipelineInput |
---|
[Int32] | true | named | false |
Top
Type | Required | Position | PipelineInput |
---|
[Int32] | true | named | false |
Left
Type | Required | Position | PipelineInput |
---|
[Int32] | true | named | false |
Bottom
Type | Required | Position | PipelineInput |
---|
[Int32] | true | named | false |
Right
Type | Required | Position | PipelineInput |
---|
[Int32] | true | named | false |
Expand
Type | Required | Position | PipelineInput |
---|
[Switch] | true | named | false |
Syntax
Format-SpectrePadded -Data <Object> -Padding <Int32> [<CommonParameters>]
Format-SpectrePadded -Data <Object> -Top <Int32> -Left <Int32> -Bottom <Int32> -Right <Int32> [<CommonParameters>]
Format-SpectrePadded -Data <Object> -Expand [<CommonParameters>]