Pass variable to modal

Hi,

why is $t not passed to the modal in this?

$t = “Titel”
New-UDButton -Icon wifi -OnClick {
Show-UDModal -Content {
New-UDHeading -Text $t
}
}

@kort3x

Welcome to the UD forum :slight_smile:

I think the problem is that you have to pass the variable to the button first … find more info in the dochttps://docs.universaldashboard.io/components/button (at the bottom)

1 Like

Thanks!

1 Like