fix: create button bg

pull/10493/head
Tienson Qin 2023-11-08 22:00:59 +08:00
parent 8dfad076c1
commit 117ebe0768
2 changed files with 12 additions and 5 deletions

View File

@ -110,10 +110,13 @@
[:div.flex.items-center.gap-3
[:div.w-5.h-5.rounded.flex.items-center.justify-center
{:style {:background (when (#{:gradient} icon-theme) "linear-gradient(-65deg, #8AE8FF, #5373E7, #369EFF, #00B1CC)")
:box-shadow (when (#{:color :gradient} icon-theme) "inset 0 0 0 1px rgba(255,255,255,0.3) ")}
:box-shadow (when (#{:gradient} icon-theme) "inset 0 0 0 1px rgba(255,255,255,0.3) ")}
:class (cond-> "w-5 h-5 rounded flex items-center justify-center"
(= icon-theme :color) (str " bg-accent-10 dark:bg-accent-09 dark:text-white")
(= icon-theme :gray) (str " bg-gray-05 dark:bg-gray-05 dark:text-white"))}
(= icon-theme :color) (str
" "
(if highlighted "bg-accent-07-alpha" "bg-gray-05")
" dark:text-white")
(= icon-theme :gray) (str " bg-gray-05 dark:text-white"))}
(icon/root icon {:size "14"
:class ""})]
[:div.flex.flex-1.flex-col

View File

@ -67,8 +67,12 @@
(defn create-items [q]
(when-not (string/blank? q)
[{:text "Create page" :icon "new-page" :icon-theme :color :info (str "Create page called '" q "'") :source-create :page}
{:text "Create whiteboard" :icon "new-whiteboard" :icon-theme :color :info (str "Create whiteboard called '" q "'") :source-create :whiteboard}]))
[{:text "Create page" :icon "new-page"
:icon-theme :color
:info (str "Create page called '" q "'") :source-create :page}
{:text "Create whiteboard" :icon "new-whiteboard"
:icon-theme :color
:info (str "Create whiteboard called '" q "'") :source-create :whiteboard}]))
;; Take the results, decide how many items to show, and order the results appropriately
(defn state->results-ordered [state search-mode]