Scripts/New-UDStepBar.ps1

<#
.SYNOPSIS
    Sample control for UniversalDashboard.
.DESCRIPTION
    Sample control function for UniversalDashboard. This function must have an ID and return a hash table.
.PARAMETER Id
    An id for the component default value will be generated by new-guid.
.EXAMPLE
    PS C:\> <example usage>
    Explanation of what the example does
.INPUTS
    Inputs (if any)
.OUTPUTS
    Output (if any)
.NOTES
    General notes
#>

function New-UDStepBar {
    param(
        [Parameter()]
        [string]$Id = (New-Guid).ToString(),
        [Parameter()]
        [int]$ActiveStep = 0,
        [Parameter()]
        [string]$CircleActiveColor = "#5096FF",
        [Parameter()]
        [string]$CircleCompletedColor = "#000",
        [Parameter()]
        [string]$CircleDefaultColor = "#E0E0E0",
        [Parameter()]
        [string]$TitleActiveColor = "#000",
        [Parameter()]
        [string]$TitleCompletedColor = "#00183D",
        [Parameter()]
        [string]$CircleFontColor = "#FFF",
        [Parameter()]
        [int]$CircleSize = 36,
        [Parameter()]
        [int]$CircleFontSize = 16,
        [Parameter()]
        [int]$TitleFontSize = 16,
        [Parameter()]
        [int]$DefaultBorderWidth = 0,
        [Parameter(Mandatory)]
        [scriptblock]$Steps

    )
    End {
        @{
            assetId            = $AssetId
            isPlugin           = $true
            type               = "UD-StepBar"
            id                 = $Id
            activeStep         = $ActiveStep
            activeColor        = $CircleActiveColor
            completeColor      = $CircleCompletedColor
            defaultColor       = $CircleDefaultColor
            activeTitleColor   = $TitleActiveColor
            completeTitleColor = $TitleCompletedColor
            circleFontColor    = $CircleFontColor
            size               = $CircleSize
            circleFontSize     = $CircleFontSize
            titleFontSize      = $TitleFontSize
            defaultBorderWidth = $DefaultBorderWidth
            steps              = [array]$Steps.Invoke()
        }

    }
}