Skip to content

Commit

Permalink
[nested-grid] Improve header-spacer-wrapper default part
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Aug 20, 2024
1 parent caf5e9e commit 5a0eb69
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/re_com/nested_grid.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,15 @@
(defn header-spacer-part [_] "")

(defn header-spacer-wrapper-part [{:keys [theme x y header-spacer edge] :as props}]
(let [props (-> {:style
{:grid-column (inc x)
:grid-row (inc y)}}
(merge props)
(theme/apply {:state {:edge edge} :part ::header-spacer-wrapper} theme))]
[:div props
[u/part header-spacer props :default header-spacer-part]]))
(let [grid-style {:grid-column (inc x)
:grid-row (inc y)}]
[:div (theme/apply
{:style grid-style}
{:state {:edge edge} :part ::header-spacer-wrapper}
theme)
[u/part header-spacer
(update props :style merge grid-style)
:default header-spacer-part]]))

(defn scroll-container [{:keys [scroll-top scroll-left width height style]} child]
[:div {:style (merge {:max-height height
Expand Down

0 comments on commit 5a0eb69

Please sign in to comment.