# NOT RUN {
library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(),
chakraComponent(
"mycomponent",
chakraModal(
inputId = "modal",
openButton = Tag$Button(
colorScheme = "orange",
"Open Modal"
),
header = Tag$ModalHeader(
fontSize = "lg",
fontWeight = "bold",
"Modal title"
),
body = Tag$ModalBody(
"Sit nulla est ex deserunt exercitation anim occaecat."
),
footer = Tag$ModalFooter(
Tag$ButtonGroup(
spacing = "3",
Tag$Button(
action = "close",
value = "CLOSE",
"Close"
),
Tag$Button(
action = "cancel",
colorScheme = "red",
"Cancel"
)
)
)
)
)
)
server <- function(input, output, session){
observe({
print(input[["modal"]])
})
}
if(interactive()){
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab