Learn R Programming

gentelellaShiny (version 0.1.0)

notif: Create a Gentelella notification menu

Description

Create a Gentelella notification menu

Usage

notif(..., id, icon = icon("envelope-o"), status = "primary",
  expanded = FALSE)

Arguments

...

slot for notifItem

id

menu id. Must be unique.

icon

menu icon

status

menu status: "danger", "warning", "info", "success" or "primary"

expanded

Whether the dropdown menu is open or not. FALSE by default.

Examples

Run this code
# NOT RUN {
if (interactive()) {
 library(shiny)
 library(gentelellaShiny)
 shinyApp(
   ui = gentelellaPageCustom(
    navbar = gentelellaNavbar(
    navbarItems = notif(
      id = "menunotif",
      icon = icon("envelope-o"),
      status = "danger",
      expanded = TRUE,
      lapply(X = 1:5, FUN = function(i) {
        notifItem(
          title = "John Doe",
          date = "3 min ago",
          img = paste0("https://image.flaticon.com/icons/svg/163/16382", i,".svg"),
          "Film festivals used to be do-or-die moments
          for movie makers. They were where..."
        )
      })
     )
    ),
    sidebar = gentelellaSidebar(),
    body = gentelellaBody(),
    footer = gentelellaFooter()
   ),
   server <- function(input, output) {}
 )
}

# }

Run the code above in your browser using DataLab