From a4f5e4d63e40b6620edc5821302035580d1ceb4b Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Thu, 21 Mar 2024 09:28:24 +0100 Subject: [PATCH] Simplify function to geenrate icon svg xml --- src/bi.lisp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/bi.lisp b/src/bi.lisp index 331fb6a..fbab3ad 100644 --- a/src/bi.lisp +++ b/src/bi.lisp @@ -7,15 +7,16 @@ (defparameter bi-icons '((0-circle . "") (0-circle-fill . "") - (0-square . ""))) + (0-square . "") + (0-square-fill . ""))) -(defun bi-icon (identifier) - (let ((icon-xml (rest (assoc identifier bi-icons))) - (class (concatenate 'string "bi bi-" (string-downcase identifier)))) - (concatenate 'string - "" - icon-xml - ""))) +(defun bi-build-icon (identifier &optional (dimension 16)) + (format nil + "~A" + dimension + dimension + (string-downcase identifier) + dimension + dimension + (rest (assoc identifier bi-icons))))