From b1782f0ca918e2fc2b7573c8b29aa0755f55e345 Mon Sep 17 00:00:00 2001 From: Razon Yang Date: Tue, 19 Sep 2023 11:59:27 +0800 Subject: [PATCH] fix(icon-grid): add the default icon class name when className is provided (#76) --- layouts/partials/bootstrap/icon-grid.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/partials/bootstrap/icon-grid.html b/layouts/partials/bootstrap/icon-grid.html index d32d1f5..a32e070 100644 --- a/layouts/partials/bootstrap/icon-grid.html +++ b/layouts/partials/bootstrap/icon-grid.html @@ -18,12 +18,16 @@
{{- $icon := "" }} {{- with .icon }} - {{- $icon = partial "icons/icon" (merge (dict + {{- $iconOpts := (merge (dict "width" "1.25em" "height" "1.25em" "vendor" "bootstrap" "className" "me-3") .) }} + {{- if isset . "className" }} + {{- $iconOpts = merge $iconOpts (dict "className" (printf "%s me-3" (.className)))}} + {{- end }} + {{- $icon = partial "icons/icon" $iconOpts }} {{- end }} {{- $link := "" }} {{- $url := "" }}