Card Title Icon

Hey Guys,

I have small question, maybe very silly, but I cannot get it to work.

I am trying to get a new-UDIcon to display right after the New-UDCard - Title “my Title (Icon Here)” , but cannot get this working. Off course this can be done in the Content section but then it will not line-up with the Title.

Does anyone know how to achieve this?

Product: PowerShell Universal
Version: 3.6.4

An absolutly insane workaround could be to make your own Header using -Header and New-UDCardHeader,. it allows you to specify a title, but also an action - this action could be a disabled button that has your desired icon :smiley:

Card - PowerShell Universal

New-UDCardHeader -Title "Hidden Meeting Rooms " -Action (New-UDButton -Variant 'contained' -Text 'View' -Color 'primary' -ShowLoading -OnClick {}

the Action parameter takes whatever, one could also throw an icon in there.

$Header = New-UDCardHeader -Title "Custom Booking Policy" -Action (New-UDIcon -Icon 'NetworkWired' -size '5x'                   )
$Body = New-UDCardBody -Content {
   New-UDTypography -Variant h3 -Text "lol" -Sx @{
      color = 'text.primary'
New-UDCard -Id 'EXOMeetingRoomRestricted' -Header $Header -Body $Body

Might take a bit of tinkering to get pretty though

1 Like

Hey PorreKaj ,

That is great, it does exactly what I am looking for!

This will greatly improve the readability of the many cards on my Dashboard.

1 Like

Hey @adam, does the -Action parameter do anything that makes it different enough to not just be called “-content”?

1 Like

I am curious on that too.