mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 21:11:38 +02:00
🐛 Fix layout spec with proper names
This commit is contained in:
parent
87c5aa71a3
commit
b463ebc17b
13 changed files with 46 additions and 61 deletions
|
@ -74,21 +74,6 @@
|
|||
(fmt/format-size :width value values)
|
||||
(fmt/format-size :heigth value values))))
|
||||
|
||||
(defn get-layout-orientation
|
||||
[value]
|
||||
(if (= :wrap value)
|
||||
"wrap"
|
||||
"nowrap"))
|
||||
|
||||
(defn get-layout-direction
|
||||
[value]
|
||||
(case value
|
||||
:row "row"
|
||||
:reverse-row "row-reverse"
|
||||
:column "column"
|
||||
:reverse-column "column-reverse"
|
||||
"row"))
|
||||
|
||||
(defn styles-data
|
||||
[shape]
|
||||
{:position {:props [:type]
|
||||
|
@ -134,10 +119,10 @@
|
|||
:layout-gap "gap"
|
||||
:layout-padding "padding"}
|
||||
:format {:layout name
|
||||
:layout-flex-dir get-layout-direction
|
||||
:layout-flex-dir name
|
||||
:layout-align-items name
|
||||
:layout-justify-content name
|
||||
:layout-wrap-type get-layout-orientation
|
||||
:layout-wrap-type name
|
||||
:layout-gap format-gap
|
||||
:layout-padding fmt/format-padding}}})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue