#' x
#'
#' @return
#' @export
#'
#' @examples
testApp <- function(){
ui_mainPage <- shinydashboard::dashboardPage(
skin = "green",
shinydashboard::dashboardHeader(title = "testPack"),
shinydashboard::dashboardSidebar(
shinydashboard::sidebarMenuOutput("menu")
),
shinydashboard::dashboardBody(
shinydashboard::tabItems(
shinydashboard::tabItem(
tabName = "startPageTab",
shiMo_startPageInput(id = "STP")
)
),
shiny::actionButton("testBut", "Test")
)
)
server_mainPage <- function(input, output, session){
# Reactive variables
# -------------------------------------------------------------------- #
# start page
startPage <- shiny::callModule(shiMo_startPage, "STP")
# Displays
# -------------------------------------------------------------------- #
output$menu <- shinydashboard::renderMenu({
shinydashboard::sidebarMenu(
id = "dashMenu",
shinydashboard::menuItem("start page", tabName = "startPageTab", icon = shiny::icon("folder-open"), selected = TRUE)
)
})
# Events
# -------------------------------------------------------------------- #
shiny::observeEvent(input$testBut,{
print("TEST")
}, ignoreNULL = T, ignoreInit = T)
}
app <- shiny::shinyApp(ui_mainPage, server_mainPage)
shiny::runApp(app)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.