Initiate dca modules dependencies
use_dca(theme = "default")
The theme of app. A list variables, e.g. list('header-bg-cl' = 'red')
,
a config file (.rds) or a prefined theme ("sage") is accepted.
Default is the "default" theme.
if (interactive()) {
library(shinydashboard)
library(dcamodules)
# 1. use it in the dashboardBody()
dashboardBody(
use_dca(theme = "sage")
)
# 2. create your own custom variables
custom_theme <- list(
"primary" = "blue",
"accent" = "red",
"dark" = NULL,
"light" = NULL,
"success" = NULL,
"info" = NULL,
"warning" = NULL,
"danger" = NULL,
"white" = NULL,
"black" = NULL,
"font" = NULL,
"link-font-cl" = NULL,
"content-bg-cl" = NULL,
"content-font-cl" = NULL,
"header-bg-cl" = NULL,
"header-font-cl" = NULL,
"sidebar-bg-cl" = NULL,
"sidebar-font-cl" = NULL,
"sidebar-bg-select-cl" = NULL,
"sidebar-font-select-cl" = NULL,
"sidebar-bg-hover-cl" = NULL,
"sidebar-font-hover-cl" = NULL,
"footer-bg-cl" = NULL,
"footer-font-cl" = NULL,
"waiter-bg-cl" = NULL,
"waiter-font-cl" = NULL
)
# save variables to rds
saveRDS(custom_theme, "theme_config.rds")
# set them by parsing the config rds
dashboardBody(
use_dca(theme = "theme_config.rds")
)
}