Scripts/New-UDStickyNavbar.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-UDStickyNavbar { param( [Parameter()] [string]$Id = (New-Guid).ToString(), [Parameter()] [scriptblock]$Content, [Parameter()] [string]$Width = "100%", [Parameter()] [string]$Height = "36px", [Parameter()] [string]$BackgroundColor = "#3f51b5", [Parameter()] [string]$Color = "#fff", [Parameter()] [int]$Top = "-22", [Parameter()] [int]$BottomBoundary = "1200", [Parameter()] [string]$MarginTop, [Parameter()] [string]$PaddingBottom = "0px", [Parameter()] [string]$PaddingTop = "12px", [Parameter()] [string]$PaddingLeft = "0px", [Parameter()] [string]$PaddingRight = "0px", [Parameter()] [string]$BorderRadius = "0px", [Parameter()] [string]$LeftIndent = "40%", [Parameter()] [string]$RightIndent = "25%" ) @{ # The AssetID of the main JS File assetId = $AssetId # Tell UD this is a plugin isPlugin = $true # This ID must be the same as the one used in the JavaScript to register the control with UD type = "UD-StickyNavbar" # An ID is mandatory id = $Id # This is where you can put any other properties. They are passed to the React control's props # The keys are case-sensitive in JS. content = $Content.Invoke() height = $Height width = $Width backgroundColor = $BackgroundColor color = $Color top = $Top bottomBoundary = $BottomBoundary marginTop = $MarginTop paddingTop = $PaddingTop paddingLeft = $PaddingLeft paddingRight = $PaddingRight borderRadius = $BorderRadius divLeft = $LeftIndent divRight = $RightIndent } } |