In R Shiny I am trying to dynamically set a download button's label using reactive renderText and textoutput. It works as expected but the label is always shown in the new line, and hence the button looks wacky next to a regular button as shown here
Backend logic is -
In server.R, an input field's value is used to generate conditional labels
output$mycustomlabel <- renderText({ if(input$inputtype=="One") return("Download label 1") else return("Download label 2")})
Then in UI.R, that label is used as
downloadButton("download.button.test", textOutput("mycustomlabel"))
Can someone guide why does it display text on new line, and how can I keep it on same line?