소스 검색

enhance: tile sm size

Tienson Qin 2 년 전
부모
커밋
f16127c80b
2개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      deps/shui/src/logseq/shui/list_item/v1.cljs
  2. 4 0
      resources/css/shui.css

+ 5 - 4
deps/shui/src/logseq/shui/list_item/v1.cljs

@@ -151,11 +151,12 @@
          (when value
            [:span.text-gray-11 (to-string value)])])
       (when shortcut
-        [:div {:class "flex gap-1"}
+        [:div {:class "flex gap-1"
+               :style {:opacity (if highlighted 1 0.5)}}
          (for [[index option] (map-indexed vector (string/split shortcut #" \| "))]
            [:<>
             (when (< 0 index)
-              [:div.text-gray-11 "|"])
+              [:div.text-gray-11.text-sm "|"])
             (for [sequence (string/split option #" ")
                   :let [text (->> (string/split sequence #"\+")
                                   (map print-shortcut-key)
@@ -163,6 +164,6 @@
               (button/root {:theme :gray
                             :interactive false
                             :text (string/upper-case (to-string text))
-                            :tiled true}
+                            :tiled true
+                            :size :sm}
                            context))])])]]))
-        ; [:span {:style} (str key)])])])

+ 4 - 0
resources/css/shui.css

@@ -30,6 +30,10 @@
   @apply h-6 w-6;
 }
 
+.shui__button-tiled.shui__button-size-sm .shui__button__tile {
+    @apply h-4 w-4;
+}
+
 .shui__button__tile-separator {
   @apply w-px h-full bg-gray-08-alpha;
 }