Product: PowerShell Universal
Version: 2.10.2
Hey PSU folks,
I’m building a dashboard page, which has 4 buttons below a table.
When I simply create the buttons, like below, they all show up on 1 line; just like I want. This is without creating any grids, rows/columns, etc. and they collapse properly when the screen size changes. Perfect!
$button_ApproveMembers = New-UDButton -Text "Approve Members" -Color Primary -OnClick {
}# $button_ApproveMembers
$button_ChangeMembers = New-UDButton -Text "Change Members" -Color Secondary -OnClick {
}# $button_ChangeMembers
$button_ChangeOwner = New-UDButton -Text "Change Owner" -Style @{"background-color" = "#D8E026"} -OnClick {
}# $button_ChangeOwner
$button_DeleteGroup = New-UDButton -Text "Delete Group" -Style @{"background-color" = "#D13576"} -OnClick {
}# $button_DeleteGroup
$button_ApproveMembers
$button_ChangeMembers
$button_ChangeOwner
$button_DeleteGroup
Notice the last 2 use -Style vs. -Color, because I need more than just Primary and Secondary. Like this:
$button_ChangeOwner = New-UDButton -Text "Change Owner" -Style @{"background-color" = "#D8E026"} -OnClick {
}# $button_ChangeOwner
Unfortunately when providing a color other than Primary or Secondary, they do not appear darker when hovering; like they do when using Primary or Secondary. This had led me to wrapping the button in a New-UDStyle, and I’ve also tried styling with Css. In both cases I can assign the proper background color and we get the proper darker shade of the color when hovering.
The problem is that when using New-UDStyle, or using Css, for the buttons; they are now put on a new line. I do not want them on a new line, and need them to stay on the same line. I’ve tried using display: inline !important in the -Style and Css, but no workie (I may be doing that wrong).
The below screenshot shows me using either New-UDStyle or CSS with $button_DeleteGroup, and it now appears on a new line
How can I keep the buttons on the same line, when using either New-UDStyle or Css?
Thanks,
Rob