Update alerts
This commit is contained in:
parent
57a33029e3
commit
82c0e3eb1f
1 changed files with 11 additions and 7 deletions
|
@ -2,13 +2,17 @@
|
|||
|
||||
(defmacro alert ((&key (type nil) (dismissible nil)) &body body)
|
||||
`(spinneret:with-html
|
||||
(:div :class ,(if dismissible
|
||||
(format nil "alert alert-~a alert-dismissible" type)
|
||||
(format nil "alert alert-~a" type)) :role "alert"
|
||||
,(when dismissible
|
||||
`(:button :type "button" :class "close" :data-dismiss "alert" :aria-label "Close"
|
||||
(:span :aria-hidden "true" "×")))
|
||||
,@body)))
|
||||
(:div :role "alert"
|
||||
:class ,(if dismissible
|
||||
(format nil "alert alert-~a alert-dismissible" type)
|
||||
(format nil "alert alert-~a" type))
|
||||
,(when dismissible
|
||||
`(:button :type "button"
|
||||
:class "close"
|
||||
:data-dismiss "alert"
|
||||
:aria-label "Close"
|
||||
(:span :aria-hidden "true" "×")))
|
||||
,@body)))
|
||||
|
||||
(defmacro alert-primary (&body body)
|
||||
`(alert (:type "primary") ,@body))
|
||||
|
|
Loading…
Add table
Reference in a new issue