dev.metalisp.sbt/src/component/dropdown.lisp

21 lines
597 B
Common Lisp
Raw Normal View History

2023-07-01 19:49:07 +02:00
(in-package :cl-sbt)
2023-07-02 09:15:20 +02:00
(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))))