Skip to content

Commit

Permalink
hover Alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
baileyeiu committed Jul 1, 2016
1 parent fea14c4 commit c329f8c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/bsAlert.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
#'@template item_details
#'@template footer
#'@export
bsAlert <- function(anchorId) {
bsAlert <- function(anchorId, inline = TRUE) {

bsTag <- shiny::tags$div(class = "sbs-alert", id = anchorId, " ")
class <- "sbs-alert"
if(!inline) class = paste(class, "sbs-alert-hover")

bsTag <- shiny::tags$div(class = class, id = anchorId, " ")
htmltools::attachDependencies(bsTag, shinyBSDep)

}
12 changes: 12 additions & 0 deletions inst/www/shinyBS.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.sbs-alert-hover {
position: absolute;
z-index: 1000;
width: 30%;
margin-left: 35%;
margin-top: 10px;
opacity: 0.7;
}

.sbs-alert-hover:hover {
opacity: 1.0;
}

0 comments on commit c329f8c

Please sign in to comment.