enhance: tile sm size

pull/10493/head
Tienson Qin 2023-11-02 23:14:30 +08:00
parent 439d08cf8a
commit f16127c80b
2 changed files with 9 additions and 4 deletions

View File

@ -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)])])])

View File

@ -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;
}