Open danwwilson opened 8 years ago
Hi @danwwilson , Sorry for late answer. I am trying to reproduce your example and yes i got that message too with this https://gist.github.com/dmpe/0e3bdf2ec802fd8aaabe.
fa fa-user-plus
, not fa-user fa-plus
. Is that correct? Because that is what I was able to find: http://fortawesome.github.io/Font-Awesome/icon/user-plus/fa fa-user-plus
icon using https://gist.github.com/dmpe/0ed922e7ee079f6a1aa8 library(devtools)
devtools::install_github("rstudio/shiny")
menuItem(
"test stack",
icon = icon("fa fa-user-plus"),
icon("user", "fa-stack-1x"),
icon("ban", "fa-stack-2x")
)
As they & you write the icon must be inside <i>
tag thus span is will not work. But you can also try something like:
menuItem(
"test stack",
icon = icon("fa fa-user-plus"),
icon("user", "fa-stack-1x"),
icon("ban", "fa-stack-2x"),
span(shiny::icon("fa fa-user-plus"))
)
to produce
. Does that help you ?
My approach to stacking was to circumvent the missing icons from FontAwesome V4.2. However it would be great if it was possible to stack icons against the menuItem
within shinydashboard
Could you maybe provide some example, please? Thank you!
When attempting to stack icons in the
menuItem
I encounter the error "Error: Expected tag to be of type i"Code used is:
menuItem("test stack", tabName = "t_donorTrends", icon = span(class="fa-user fa-plus", icon("user", "fa-stack-1x"), icon("ban", "fa-stack-2x")))
I presume that this is because the
icon =
expects to seeicon = icon(...)
rather than aspan()
. Unfortunately if I ditch theicon = ...
it doesn't apply an icon to mymenuItem
Any thoughts how we can bring this useful feature to shinydashboard?