From 4ac4274cea201ab3be2957e5b5392908b97c6e90 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Sun, 2 Jul 2023 09:15:20 +0200 Subject: [PATCH] Update dropdowns --- src/dropdowns.lisp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/dropdowns.lisp b/src/dropdowns.lisp index cd2ddbc..08ffc31 100644 --- a/src/dropdowns.lisp +++ b/src/dropdowns.lisp @@ -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))))