Skip to content

Commit

Permalink
Add title-alignment to card
Browse files Browse the repository at this point in the history
  • Loading branch information
BoSen29 authored Oct 11, 2019
1 parent ea93dcd commit 156fd8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/UniversalDashboard.Materialize/Scripts/card.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ function New-UDCard {
[String]$Id = ([Guid]::NewGuid()),
[Parameter()]
[String]$Title,
[Parameter()]
[ValidateSet('left', 'center', 'right')]
[String]$TitleAlignment = 'left',
[Parameter(ParameterSetName = 'content')]
[ScriptBlock]$Content,
[Parameter(ParameterSetName = 'endpoint')]
Expand Down Expand Up @@ -69,7 +72,7 @@ function New-UDCard {
}

New-UDElement -Tag "div" -Attributes @{ className = 'card-content' } -Content {
New-UDElement -Tag 'span' -Attributes @{ className = "card-title $activatorClass" } -Content {
New-UDElement -Tag 'span' -Attributes @{ className = "card-title $TitleAlignment-align $activatorClass" } -Content {
$Title

if ($Reveal -ne $null) {
Expand Down

0 comments on commit 156fd8f

Please sign in to comment.