RinteRface / bs4Dash

Bootstrap 4 shinydashboard using AdminLTE3
https://bs4dash.rinterface.com
Other
435 stars 81 forks source link

Is there a way to update a `bs4Ribbon` color?? #291

Closed jcrodriguez1989 closed 2 years ago

jcrodriguez1989 commented 2 years ago

Hi, I am creating a bs4Ribbon for which I need to go updating the color. This is something I regularly achieve by assigning a shiny::uiOutput instead of the color name. However, I am not being able to perform this, because it seems that bs4Ribbon checks that the color is one of the default colors:

>     bs4Dash::ribbon(
+       shiny::textOutput(ns("cell_ribbon")),
+       shiny::uiOutput(ns("cell_ribbon_color"))
+     )
Error in validateStatusPlus(color) : 
  Invalid status: <div id="cell_ribbon_color" class="shiny-html-output"></div>. Valid statuses are: primary, secondary, info, success, warning, danger, gray-dark, gray, white, indigo, lightblue, navy, purple, fuchsia, pink, maroon, orange, lime, teal, olive.
In addition: Warning message:
In if (status %in% validStatusesPlus) { :
DivadNojnarg commented 2 years ago

Yes if you apply a color that is not supported by AdminLTE3 CSS, the ribbon won't have any color. This is why I always check the color name.