dreamRs / fresh

Fresh shiny themes
https://dreamrs.github.io/fresh/
GNU General Public License v3.0
229 stars 10 forks source link

Shiny Dashboard Box Title's Colour Set With box_bg #14

Open MShields1986 opened 1 year ago

MShields1986 commented 1 year ago

When using adminlte_global's box_bg arguement it sets the colour for every boxes title test to be the same as the background, rendering them undreadable.

Theme that will hide titles

my_theme <- create_theme(
    adminlte_color(
        light_blue = "#1e232b"
    ),
    adminlte_sidebar(
        width = "400px",
        dark_bg = "#1e232b",
        dark_hover_bg = "#1e232b",
        dark_color = "#1e232b"
    ),
    adminlte_global(
        content_bg = "#1e232b",
        box_bg = "#363e4d",
        info_box_bg = "#9ebeff"
    )
)

Theme that will not hide titles but retains the default box background colour

my_theme <- create_theme(
    adminlte_color(
        light_blue = "#1e232b"
    ),
    adminlte_sidebar(
        width = "400px",
        dark_bg = "#1e232b",
        dark_hover_bg = "#1e232b",
        dark_color = "#1e232b"
    ),
    adminlte_global(
        content_bg = "#1e232b",
        #box_bg = "#363e4d",
        info_box_bg = "#9ebeff"
    )
)

Example use

    dashboardBody(use_theme(my_theme),
        fluidRow(
            box(
                title = "I Change Colour", status = "primary", solidHeader = FALSE,
                collapsible = TRUE, width=12,
                valueBoxOutput("some_value_box", width=6)
            )
        )
    )