Update dropdowns

This commit is contained in:
Marcus Kammer 2023-07-02 09:15:20 +02:00
parent 12f5abbe37
commit 4ac4274cea
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -1 +1,20 @@
(in-package :cl-sbt)
(defmacro dropdown ((&key (title "")) &body body)
`(spinneret:with-html
(:div :class "dropdown"
(:button :class "btn btn-secondary dropdown-toggle"
:type "button"
:data-bs-toggle "dropdown"
:aria-expanded "false"
,title)
,@body)))
(defmacro dropdown-menu (&body body)
`(spinneret:with-html
(:ul :class "dropdown-menu"
,@body)))
(defmacro dropdown-item (&body body)
`(spinneret:with-html
(:li (:a :class "dropdown-item" :href "#" ,@body))))