Alert feature within card.pro
An alert feature is already implemented within card.pro for the user to utilize if needed. This alert feature may be trigger using the the alert.text
and alert.type
arguments.
The alert.text argument allows the user to include the alert text or list of items to be inserted in the alert section of the card. An example of how this argument may be declared within the card.pro is show below -
#example1
card.pro::card.pro("Sample text", title = "Title text", alert.text = "Hello this is alert")
#example2
card.pro::card.pro("Sample text", title = "Title text", alert.text = list(
tags$h2("Hellow is the alert A"),
actionButton("button1","Click button for action based on alert")
))
The alert.type argument allows the user to indicate what type of alert they’d like to insert. This determines the alert background color and text color for the alert item. The choices for the alert.type
are “warning”, “info”, “success”, “danger”.
#example1
card.pro::card.pro("Sample text", title = "Title text", alert.text = "Hello this is alert", alert.type = "warning")
Below is an example of the alert included in a card panel