mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
🐛 Fix problem with align-self in grid
This commit is contained in:
parent
203f36e064
commit
4f6b21c41c
1 changed files with 9 additions and 3 deletions
|
@ -41,12 +41,18 @@
|
|||
(let [new-css-system (mf/use-ctx ctx/new-css-system)
|
||||
dir-v [:auto :start :center :end :stretch #_:baseline]
|
||||
alignment (or alignment :auto)
|
||||
type (if is-col? "col" "row")]
|
||||
type (if is-col? "col" "row")
|
||||
|
||||
handle-set-alignment
|
||||
(mf/use-callback
|
||||
(mf/deps set-alignment)
|
||||
(fn [value]
|
||||
(set-alignment (-> value keyword))))]
|
||||
|
||||
(if new-css-system
|
||||
[:div {:class (stl/css :self-align-menu)}
|
||||
[:& radio-buttons {:selected (d/name alignment)
|
||||
:on-change #(set-alignment (keyword %))
|
||||
:on-change handle-set-alignment
|
||||
:name (dm/str "flex-align-items-" type)}
|
||||
[:& radio-button {:value "start"
|
||||
:icon (if is-col? i/align-self-row-left-refactor i/align-self-column-top-refactor)
|
||||
|
@ -93,7 +99,7 @@
|
|||
cell (or cell (attrs/get-attrs-multi cells cell-props))
|
||||
|
||||
multiple? (= :multiple (:id cell))
|
||||
cell-ids (if (some? cell) [(:id cell)] (->> cells (map :id)))
|
||||
cell-ids (if multiple? (->> cells (map :id)) [(:id cell)])
|
||||
cell-ids (hooks/use-equal-memo cell-ids)
|
||||
|
||||
{:keys [position area-name align-self justify-self column column-span row row-span]} cell
|
||||
|
|
Loading…
Add table
Reference in a new issue