File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 19
19
; ; represent a value.
20
20
21
21
(clerk/add-viewers!
22
- [{:pred number? :render-fn '#(v/html [:div.inline-block {:style {:width 16 :height 16 }
23
- :class (if (pos? %) " bg-black" " bg-white border-solid border-2 border-black" )}])}
24
- {:pred list? :render-fn '#(v/html (into [:div.flex.flex-col ] (v/inspect-children %2 ) %1 ))}
25
- {:pred #(and (vector? %) (not (map-entry? %))) :render-fn '#(v/html (into [:div.flex.inline-flex ] (v/inspect-children %2 ) %1 ))}])
22
+ [{:pred number?
23
+ :render-fn '#(v/html [:div.inline-block {:style {:width 16 :height 16 }
24
+ :class (if (pos? %) " bg-black" " bg-white border-solid border-2 border-black" )}])}
25
+ {:pred (every-pred list? (partial every? (some-fn number? vector?)))
26
+ :render-fn '#(v/html (into [:div.flex.flex-col ] (v/inspect-children %2 ) %1 ))}
27
+ {:pred (every-pred vector? (complement map-entry?) (partial every? number?))
28
+ :render-fn '#(v/html (into [:div.flex.inline-flex ] (v/inspect-children %2 ) %1 ))}])
26
29
27
30
; ; Now let's test each one to make sure they look the way we want:
28
31
You can’t perform that action at this time.
0 commit comments