diff --git a/src/component/alert.lisp b/src/component/alert.lisp index e0667a7..338984c 100644 --- a/src/component/alert.lisp +++ b/src/component/alert.lisp @@ -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))