Use local var for constructing class str

This commit is contained in:
Marcus Kammer 2023-09-02 09:11:32 +02:00
parent b7d0007535
commit a8996b1a75
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -269,14 +269,14 @@ Examples:
(col (:spacing (:property :p :size 2)) \"Hello, world!\") (col (:spacing (:property :p :size 2)) \"Hello, world!\")
; This will generate a column that has a padding of 2 units on all sides, ; This will generate a column that has a padding of 2 units on all sides,
; containing the text 'Hello, world!'." ; containing the text 'Hello, world!'."
`(spinneret:with-html (let ((class-str (string-clean
(:div :class (concatenate 'string
,(string-clean (if (null cols) "col " (format nil "col-~d " cols))
(concatenate 'string (if (null breakpoint) ""
(if (null cols) "col " (format nil "col-~d " cols)) (apply #'breakpoint-class breakpoint))
(if (null breakpoint) "" (if (null alignself) "" (format nil "align-self-~a " alignself))
(apply #'breakpoint-class breakpoint)) (if (null spacing) ""
(if (null alignself) "" (format nil "align-self-~a " alignself)) (apply #'cl-sbt/utility:spacing spacing))))))
(if (null spacing) "" `(spinneret:with-html
(apply #'cl-sbt/utility:spacing spacing)))) (:div :class ,class-str
,@body))) ,@body)))