Add page-num-active style disabling pointer cursor

This commit is contained in:
Vitaliy Vlasov 2018-01-25 13:43:15 +02:00
parent df8de46532
commit bb71d830a8
2 changed files with 10 additions and 6 deletions

View File

@ -48,15 +48,15 @@
(defn draw-page-numbers [page-number page-count]
"Draw page numbers for the pagination component.
Inserts ellipsis when list is too long, by default
max 6 items are allowed"
Inserts ellipsis when list is too long, by default
max 6 items are allowed"
(let [draw-page-num-fn (fn [current? i]
^{:key i}
[:div.rectangle-rounded
(cond-> {}
(not current?)
(assoc :class "grayed-out-page-num"
:on-click #(rf/dispatch [:set-page-number i])))
(if current?
{:class "page-num-active"}
{:class "grayed-out-page-num"
:on-click #(rf/dispatch [:set-page-number i])})
i])
max-page-nums 6]
[:div.page-nums-container

View File

@ -897,6 +897,10 @@ body {
cursor: pointer;
}
.page-num-active {
cursor: auto;
}
.grayed-out-page-num {
color: #8d99a4;
background-color: #f2f5f8;