How to return multiple strings in a Modal

looking to get an array or strings printed in a Modal with each item on its own “line”… not sure of the best way to do this or if something else should be used besides Modal.

The code i’m using is this (and i’ve tried iterations without the carriage returns):
Show-UDModal -Content {
foreach ($r in $res){ New-UDTypography -Text “$rnr”}

I’m looking for:

instead of $r[0] $r[1] $r[2] which is what i’m currently getting

If you place them inside a paragraph tag it should have the correct effect.

        Show-UDModal -Content {
            $res = @('1', '2', '3')
            foreach ($r in $res){ New-UDElement -Tag p -Content { New-UDTypography -Text "$r" } }

Thanks Adam!!! Worked like a charm, did just what i was looking for. Much appreciated.

How would I use New-UDTypography to change colors of text on the same line?

New-UDTypography -Text 'My Text' -Style @{ color = 'blue' }


Curtis Dove

With curtis being blue and dove being red

I think as long as you are not using a variant for New-UDTypography you can use this:

New-UDTypography -Text 'Curtis ' -Style @{ color = 'blue' }
New-UDTypography -Text 'Dove' -Style @{ color = 'red' }

Using a variant will push it the second line to a new line on the page.

it would need to be in the same line

My example should do it. Otherwise, you may need to use New-UDHtml.

New-UDHtml -Markup '<span style="color:blue">Curtis </span><span style="color:red">Dove</span>'