Skip to content

Commit

Permalink
standard_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Mar 5, 2024
1 parent 32c57eb commit ba5a01d
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 8 deletions.
35 changes: 31 additions & 4 deletions R/standard_layout.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' Create a standard UI layout with output on the right and an encoding panel on
#' the left
#' Standard UI layout
#'
#' @description `r lifecycle::badge("stable")`
#' This is the layout used by the `teal` modules.
#' @description `r lifecycle::badge("stable")`\cr
#' Create a standard UI layout with output on the right and an encoding panel on
#' the left. This is the layout used by the `teal` modules.
#'
#' @param output (`shiny.tag`)\cr
#' object with the output element (table, plot, listing) such as for example returned
Expand All @@ -19,6 +19,33 @@
#'
#' @return an object of class \code{shiny.tag} with the UI code.
#'
#' @examples
#' library(shiny)
#' standard_layout(
#' output = white_small_well(h3("Tests")),
#' encoding = div(
#' teal.reporter::simple_reporter_ui("simple_reporter"),
#' tags$label("Encodings", class = "text-primary"),
#' panel_item(
#' "Tests",
#' optionalSelectInput(
#' "tests",
#' "Tests:",
#' choices = c(
#' "Shapiro-Wilk",
#' "Kolmogorov-Smirnov (one-sample)"
#' ),
#' selected = "Shapiro-Wilk"
#' )
#' )
#' ),
#' forms = tagList(
#' verbatim_popup_ui("warning", "Show Warnings"),
#' verbatim_popup_ui("rcode", "Show R code")
#' )
#' )
#'
#'
#' @export
standard_layout <- function(output,
encoding = NULL,
Expand Down
36 changes: 32 additions & 4 deletions man/standard_layout.Rd

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

0 comments on commit ba5a01d

Please sign in to comment.