R/extract_ggplot_theme.R

Defines functions extract_ggplot_theme

Documented in extract_ggplot_theme

# WARNING - Generated by {fusen} from /dev/flat_figma_ggplot_correspondance.Rmd: do not edit by hand

#' Extract the {ggplot2} theme elements from a Figma file
#' 
#' @param .data List. An object returned by \code{architekter::\link{get_figma_file_content}()}
#' 
#' @return A tibble with the {ggplot2} theme elements extracted from the Figma file.
#' 
#' @export
#' @examples
#' data(toy_raw_file_content)
#' 
#' toy_raw_file_content %>% 
#'   extract_ggplot_theme()
extract_ggplot_theme <- function(.data) {
  
  .data %>% 
    raw_to_design_tibble() %>% 
    add_ggplot_theme_type() %>% 
    determine_ggplot_theme_elements()
    
}
ThinkR-open/swatch documentation built on April 7, 2022, 6:08 p.m.