🎉 Add inline SVG and npm cli tools

This commit is contained in:
alonso.torres 2023-11-27 12:27:01 +01:00 committed by Alonso Torres
parent ebd6cdfe29
commit 87d176fa2f
7 changed files with 25 additions and 12 deletions

View file

@ -1,11 +1,10 @@
(ns app.main.ui.components.buttons.simple-button
(:require-macros [app.main.style :as stl])
(:require
[app.common.data.macros :as dm]
[rumext.v2 :as mf]))
(mf/defc simple-button
{::mf/wrap-props false}
[{:keys [on-click children]}]
[:button {:on-click on-click :class (dm/str (stl/css :button))} children])
[:button {:on-click on-click :class (stl/css :button)} children])

View file

@ -7,11 +7,10 @@
(mf/defc story-wrapper
{::mf/wrap-props false}
[{:keys [children]}]
[:.default children])
[:.default children])
(def ^export default #js {
:icons #js {
:IconAddRefactor icons/add-refactor
}
:StoryWrapper story-wrapper
:SimpleButton sb/simple-button})
(def ^export default #js
{:icons #js
{:IconAddRefactor icons/add-refactor}
:StoryWrapper story-wrapper
:SimpleButton sb/simple-button})

View file

@ -9,7 +9,7 @@
(defmacro icon-xref
[id]
(let [href (str "/images/sprites/symbol/icons.svg#icon-" (name id))
(let [href (str "#icon-" (name id))
class (str "icon-" (name id))]
`(rumext.v2/html
[:svg {:width 500 :height 500 :class ~class}