# NOT RUN {
if (interactive()) {
library(shiny)
library(shinyMobile)
shiny::shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(title = "f7List"),
# simple list
f7List(
lapply(1:3, function(j) {
if (j == 1) {
f7Swipeout(
tag = f7ListItem(letters[j]),
side = "left",
f7SwipeoutItem(id = "alert", color = "pink", "Alert"),
f7SwipeoutItem(id = "notification", color = "green", "Notif")
)
} else {
f7ListItem(letters[j])
}
})
)
)
),
server = function(input, output, session) {
observe({
print(input$alert)
print(input$notification)
})
observeEvent(input$notification, {
f7Notif(
text = "test",
icon = f7Icon("bolt_fill"),
title = "Notification",
subtitle = "A subtitle",
titleRightText = "now",
session = session
)
})
observeEvent(input$alert, {
f7Dialog(
title = "Dialog title",
text = "This is an alert dialog",
session = session
)
})
}
)
}
# }
Run the code above in your browser using DataLab