                    (fn []
                      (modal/show!
                       confirm-dialog
-                      {:on-accept #(st/emit! (dlib/delete-item :images library-id id))
+                      {:on-accept #(do
+                                     (st/emit! (dlib/delete-item :images library-id id))
+                                     (on-delete id))
                        :message "Are you sure you want to delete this image?"
                        :accept-text "Delete"}))]]}]]]))
 
 (mf/defc library-color-card
-  [{:keys [item on-select on-unselect]}]
-  (let [{:keys [ id content library-id modified-at]} item
+  [{:keys [item on-select on-unselect on-delete]}]
+  (let [{:keys [id content library-id modified-at]} item
         locale (i18n/use-locale)
-        state (mf/use-state {:is-open false})
+        state (mf/use-state {:is-open false :selected false})
         handle-change (fn []
                         (swap! state update :selected not)
                         (if (:selected @state)

                         :accept-text "Delete"})))]]}]]

     [:div.library-top-menu-actions
      [:a.library-top-menu-actions-delete
       {:on-click #(when on-delete-selected (on-delete-selected))}
       i/trash]

      (if (= section :palettes)
        [:button.btn-secondary.btn-small

                   (fn []
                     (modal/show!
                      confirm-dialog
                      {:on-accept #(do
                                     (st/emit! (dlib/delete-item :icons library-id id))
                                     (on-delete id))
                       :message "Are you sure you want to delete this icon?"
                       :accept-text "Delete"}))]]}]]]))

(mf/defc library-image-card
  [{:keys [item on-select on-unselect on-delete]}]
  (let [{:keys [id name thumb-uri library-id modified-at]} item
        locale (i18n/use-locale)
        state (mf/use-state {:is-open false :selected false})
        time (dt/timeago modified-at {:locale locale})
        handle-change (fn []
                        (swap! state update :selected not)
