mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Add more context help
This commit is contained in:
parent
a2f3ea4448
commit
d23646e0a9
4 changed files with 84 additions and 15 deletions
23
R/utils.R
23
R/utils.R
|
|
@ -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))
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue