From cd0d228060e76f54673f6381c715d5a8f32b4435 Mon Sep 17 00:00:00 2001 From: pvictor Date: Thu, 23 May 2024 09:38:35 +0200 Subject: [PATCH] fix switchInput docs, fix #687 --- R/input-switch.R | 8 ++++---- man/switchInput.Rd | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/input-switch.R b/R/input-switch.R index d5a84e23..8855aca0 100644 --- a/R/input-switch.R +++ b/R/input-switch.R @@ -3,7 +3,7 @@ #' @description #' Create a toggle switch. #' -#' @param inputId The \code{input} slot that will be used to access the value. +#' @param inputId The `input` slot that will be used to access the value. #' @param label Display a text in the center of the switch. #' @param value Initial value (TRUE or FALSE). #' @param onLabel Text on the left side of the switch (TRUE). @@ -15,7 +15,7 @@ #' @param handleWidth Width of the left and right sides in pixels. #' @param disabled Logical, display the toggle switch in disabled state?. #' @param inline Logical, display the toggle switch inline? -#' @param width The width of the input : 'auto', 'fit', '100px', '75%'. +#' @param width The width of the input : 'auto', '100px', '75%'. #' #' @return A switch control that can be added to a UI definition. #' @@ -29,7 +29,7 @@ #' @note For more information, see the project on Github #' \url{https://github.com/Bttstrp/bootstrap-switch}. #' -#' @seealso \code{\link{updateSwitchInput}}, \code{\link{materialSwitch}} +#' @seealso [updateSwitchInput()], [materialSwitch()], [prettySwitch()] #' #' @examples #' ## Only run examples in interactive R sessions @@ -62,7 +62,7 @@ switchInput <- function(inputId, inline = FALSE, width = NULL) { value <- shiny::restoreInput(id = inputId, default = value) - size <- match.arg(arg = size, choices = c('default', 'mini', 'small', 'normal', 'large')) + size <- match.arg(arg = size, choices = c("default", "mini", "small", "normal", "large")) switchProps <- dropNulls( list( id = inputId, diff --git a/man/switchInput.Rd b/man/switchInput.Rd index 620a7bbe..1dd492c3 100644 --- a/man/switchInput.Rd +++ b/man/switchInput.Rd @@ -45,7 +45,7 @@ switchInput( \item{inline}{Logical, display the toggle switch inline?} -\item{width}{The width of the input : 'auto', 'fit', '100px', '75\%'.} +\item{width}{The width of the input : 'auto', '100px', '75\%'.} } \value{ A switch control that can be added to a UI definition. @@ -76,5 +76,5 @@ shinyApp(ui, server) } } \seealso{ -\code{\link{updateSwitchInput}}, \code{\link{materialSwitch}} +\code{\link[=updateSwitchInput]{updateSwitchInput()}}, \code{\link[=materialSwitch]{materialSwitch()}}, \code{\link[=prettySwitch]{prettySwitch()}} }