birthstoneUI <- function(id) {
p(
"The birthstone for ", textOutput(NS(id, "month"), inline = TRUE),
" is ", textOutput(NS(id, "stone"), inline = TRUE)
)
}
birthstoneServer <- function(id, month) {
stopifnot(is.reactive(month))
moduleServer(id, function(input, output, session) {
stone <- reactive(stones$stone[stones$month == month()])
output$month <- renderText(month())
output$stone <- renderText(stone())
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.