Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expanded add_card_button_srv docs #57

Merged
merged 2 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions R/AddCardModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ add_card_button_ui <- function(id) {
#' @description server for adding views/cards to the Report.
#'
#' For more details see the vignette: `vignette("simpleReporter", "teal.reporter")`.
#'
#' @details
#' This module allows using a child of `ReportCard` instead of `ReportCard`.
#' To properly support this, an instance of the child class must be passed
#' as the default value of the `card` argument in the `card_fun` function.
#' See below:
#' ```{r}
#' CustomReportCard <- R6::R6Class( # nolint: object_name_linter.
#' classname = "CustomReportCard",
#' inherit = teal.reporter::ReportCard
#' )
#'
#' custom_function <- function(card = CustomReportCard$new()) {
#' card
#' }
#' ```
#'
#' @param id `character`
#' @param reporter `Reporter` instance.
#' @param card_fun `function` which returns a `ReportCard` instance,
Expand Down
16 changes: 16 additions & 0 deletions man/add_card_button_srv.Rd

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