Skip to content

Commit

Permalink
chore: Use SUPPORTED_THEMES from semantic.assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubnowicki committed Nov 21, 2023
1 parent 5f5a7f0 commit 3081bb8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 29 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Expand Up @@ -3,7 +3,6 @@
export(COLOR_PALETTE)
export(Progress)
export(SIZE_LEVELS)
export(SUPPORTED_THEMES)
export(accordion)
export(actionButton)
export(action_button)
Expand Down
7 changes: 0 additions & 7 deletions R/constants.R
Expand Up @@ -8,13 +8,6 @@ COLOR_PALETTE <- c("#A333C8", "#21BA45", "#2185D0", "#DB2828", "#F2711C", "#FBBD
names(COLOR_PALETTE) <- c("purple", "green", "blue", "red", "orange", "yellow", "olive", "teal",
"violet", "pink", "brown", "grey", "black")

#' Supported semantic themes
#' @export
SUPPORTED_THEMES <- c("cerulean", "darkly", "paper", "simplex", # nolint
"superhero", "flatly", "slate", "cosmo",
"readable", "united", "journal", "solar",
"cyborg", "sandstone", "yeti", "lumen", "spacelab")

#' Allowed sizes
#' @export
SIZE_LEVELS <- c("mini", "tiny", "small", "", "large", "huge", "massive")
4 changes: 2 additions & 2 deletions R/dropdown.R
Expand Up @@ -287,8 +287,8 @@ updateSelectInput <- function(session, inputId, label = NULL, choices = NULL, se
#' @export
theme_selector <- function(input_id = "theme", label = "Choose theme") {
dropdown_content <- dropdown_input(
"theme", choices = c("default", SUPPORTED_THEMES),
choices_value = c("", SUPPORTED_THEMES),
"theme", choices = c("default", semantic.assets::SUPPORTED_THEMES),
choices_value = c("", semantic.assets::SUPPORTED_THEMES),
type = "selection fluid themes-dropdown"
)
shiny::div(
Expand Down
3 changes: 2 additions & 1 deletion R/semanticPage.R
Expand Up @@ -107,7 +107,8 @@ get_css_file <- function(type, theme = NULL, minified = NULL) {
#' wrapper (e.g. style, class etc.)
#' @param title A title to display in the browser's title bar.
#' @param theme Theme name or path. Full list of supported themes you will find in
#' \code{SUPPORTED_THEMES} or at http://semantic-ui-forest.com/themes.
#' \code{\link[semantic.assets:SUPPORTED_THEMES]{semantic.assets::SUPPORTED_THEMES}}
#' or at http://semantic-ui-forest.com/themes.
#' @param suppress_bootstrap boolean flag that supresses bootstrap when turned on
#' @param margin character with body margin size
#' @examples
Expand Down
16 changes: 0 additions & 16 deletions man/SUPPORTED_THEMES.Rd

This file was deleted.

3 changes: 2 additions & 1 deletion man/semanticPage.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkgdown/_pkgdown.yml
Expand Up @@ -176,7 +176,6 @@ reference:
contents:
- '`COLOR_PALETTE`'
- '`SIZE_LEVELS`'
- '`SUPPORTED_THEMES`'

- title: Other
desc: Other useful functions or objects.
Expand Down

0 comments on commit 3081bb8

Please sign in to comment.