Added readme and renamed bannerDisconnectHandler
This commit is contained in:
@@ -1 +1,2 @@
|
||||
^LICENSE\.md$
|
||||
^README\.Rmd$
|
||||
|
||||
44
README.Rmd
Normal file
44
README.Rmd
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
output: github_document
|
||||
---
|
||||
|
||||
<!-- README.md is generated from README.Rmd. Please edit that file -->
|
||||
|
||||
```{r, include = FALSE}
|
||||
knitr::opts_chunk$set(
|
||||
collapse = TRUE,
|
||||
comment = "#>",
|
||||
fig.path = "man/figures/README-",
|
||||
out.width = "100%"
|
||||
)
|
||||
```
|
||||
|
||||
# AVSDevR.ShinyDisconnectHandler
|
||||
|
||||
<!-- badges: start -->
|
||||
<!-- badges: end -->
|
||||
|
||||
The goal of AVSDevR.ShinyDisconnectHandler is to provide alternatives to the Shiny default disconnect handler with nicer styling, refresh options and user interaction.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the development version of AVSDevR.ShinyDisconnectHandler like so:
|
||||
|
||||
``` r
|
||||
remotes::install_git("https://git.avsdev.uk/R/AVSDevR.ShinyDisconnectHandler")
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
To use a disconnect banner instead of the default disconnect handler:
|
||||
|
||||
```{r banner_example, eval = FALSE}
|
||||
library(AVSDevR.ShinyDisconnectHandler)
|
||||
ui <- shiny::fluidPage(
|
||||
useBannerDisconnectHandler()
|
||||
)
|
||||
server <- function(...) {
|
||||
stop("This stops the server, disconnecting the client")
|
||||
}
|
||||
shiny::runApp(shiny::shinyApp(ui, server))
|
||||
```
|
||||
35
README.md
Normal file
35
README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
<!-- README.md is generated from README.Rmd. Please edit that file -->
|
||||
|
||||
# AVSDevR.ShinyDisconnectHandler
|
||||
|
||||
<!-- badges: start -->
|
||||
<!-- badges: end -->
|
||||
|
||||
The goal of AVSDevR.ShinyDisconnectHandler is to provide alternatives to
|
||||
the Shiny default disconnect handler with nicer styling, refresh options
|
||||
and user interaction.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the development version of
|
||||
AVSDevR.ShinyDisconnectHandler like so:
|
||||
|
||||
``` r
|
||||
remotes::install_git("https://git.avsdev.uk/R/AVSDevR.ShinyDisconnectHandler")
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
To use a disconnect banner instead of the default disconnect handler:
|
||||
|
||||
``` r
|
||||
library(AVSDevR.ShinyDisconnectHandler)
|
||||
ui <- shiny::fluidPage(
|
||||
useBannerDisconnectHandler()
|
||||
)
|
||||
server <- function(...) {
|
||||
stop("This stops the server, disconnecting the client")
|
||||
}
|
||||
shiny::runApp(shiny::shinyApp(ui, server))
|
||||
```
|
||||
Reference in New Issue
Block a user