diff --git a/inst/examples/10_download/app.R b/inst/examples/10_download/app.R index b5a6dd1f22..bfc667325b 100644 --- a/inst/examples/10_download/app.R +++ b/inst/examples/10_download/app.R @@ -1,34 +1,22 @@ +library(bslib) library(shiny) # Define UI for data download app ---- -ui <- fluidPage( +ui <- page_sidebar( # App title ---- - titlePanel("Downloading Data"), + tableOutput("table"), # Sidebar layout with input and output definitions ---- - sidebarLayout( - - # Sidebar panel for inputs ---- - sidebarPanel( - - # Input: Choose dataset ---- - selectInput("dataset", "Choose a dataset:", - choices = c("rock", "pressure", "cars")), - - # Button - downloadButton("downloadData", "Download") - - ), - - # Main panel for displaying outputs ---- - mainPanel( - - tableOutput("table") - - ) - - ) + sidebar = sidebar( + # Input: Choose dataset ---- + selectInput("dataset", "Choose a dataset:", + choices = c("rock", "pressure", "cars")), + + # Button + downloadButton("downloadData", "Download") + ), + title = "Downloading Data" ) # Define server logic to display and download selected file ----