Product: PowerShell Universal
Version: 1.4.6
First of all, this layout blows my mind. I used to have to do this with modulus back in the day.
Next, I’m looking to set a theme by clicking its thumbnails but I can’t figure out how to get EventData from the thing that I’ve created that is beautiful.
New-UDLayout -Columns 3 -Content {
Get-AllThemes | Select-Object -First 30 | ForEach-Object {
New-UDElement -Tag div -Attributes @{
style = @{
cursor = "pointer"
}
onClick = {
#Set-ActiveTheme $EventData.Id
Show-UDToast -Message "$EventData"
}
} -Content {
# lol IDs everywhere cuz im not sure which one is driving that event data
New-UDCard -Id $PSItem -Content {
New-UDImage -Url /assets/screenshots/$PSItem-light.png -Width 256 -Height 144 -Id $PSItem
# need some padding
New-UDImage -Url /assets/screenshots/$PSItem-dark.png -Width 256 -Height 144 -Id $PSItem
}
} -Id $PSItem
}
}
Any ideas? Hopefully this is possible. I love that it’s pretty and figures out how to do the 3 columns.