userMessages: AdminLTE2 user message container

Description Usage Arguments Note Author(s) Examples

View source: R/useful-items.R

Description

Create a user message container

Usage

1
userMessages(..., status, width = 4)

Arguments

...

Slot for userMessage.

status

Messages status. See here for a list of valid colors https://adminlte.io/themes/AdminLTE/pages/UI/general.html.

width

Container width: between 1 and 12.

Note

Better to include in a boxPlus.

Author(s)

David Granjon, dgranjon@ymail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
if (interactive()) {
 library(shiny)
 library(shinydashboard)
 library(shinydashboardPlus)
 
 shinyApp(
  ui = dashboardPagePlus(
    dashboardHeaderPlus(),
    dashboardSidebar(),
    dashboardBody(
     boxPlus(
      "Box with messages",
      solidheader = TRUE,
      status = "warning",
      userMessages(
       width = 12,
       status = "success",
        userMessage(
         author = "Alexander Pierce",
         date = "20 Jan 2:00 pm",
         src = "https://adminlte.io/themes/AdminLTE/dist/img/user1-128x128.jpg",
         side = NULL,
         "Is this template really for free? That's unbelievable!"
       ),
       userMessage(
         author = "Sarah Bullock",
         date = "23 Jan 2:05 pm",
         src = "https://adminlte.io/themes/AdminLTE/dist/img/user3-128x128.jpg",
         side = "right",
         "You better believe it!"
       )
      )
     ),
     userMessages(
       width = 6,
       status = "danger",
        userMessage(
         author = "Alexander Pierce",
         date = "20 Jan 2:00 pm",
         src = "https://adminlte.io/themes/AdminLTE/dist/img/user1-128x128.jpg",
         side = NULL,
         "Is this template really for free? That's unbelievable!"
       ),
       userMessage(
         author = "Sarah Bullock",
         date = "23 Jan 2:05 pm",
         src = "https://adminlte.io/themes/AdminLTE/dist/img/user3-128x128.jpg",
         side = "right",
         "You better believe it!"
       )
      )
    ),
    title = "user Message"
  ),
  server = function(input, output) { }
 )
}

dsciencelabs/shinydashboardPlus documentation built on Dec. 20, 2021, 2:10 a.m.