Add more context help

This commit is contained in:
Elias Projahn 2024-02-18 14:29:23 +01:00
parent a2f3ea4448
commit d23646e0a9
4 changed files with 84 additions and 15 deletions

View file

@ -3,3 +3,26 @@
#' @import data.table
#' @import shiny
NULL
#' Add a help popover to a control.
#'
#' @param title Title of the help popover.
#' @param help Content of the help popover.
#' @param child The control to add the popover to.
#'
#' @noRd
popover <- function(title, help, child) {
div(
style = "display: flex;",
child,
div(
style = "margin-left: 5px;",
bslib::popover(
bsicons::bs_icon("question-circle"),
title = title,
help,
options = list(offset = c(0, 10))
)
)
)
}