mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
♻️ Derive v-sizing from values instead of passing as prop
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
3c542a1abc
commit
ba42cc04b7
@ -539,16 +539,18 @@
|
||||
[:map
|
||||
[:values schema:layout-item-props-schema]
|
||||
[:applied-tokens [:maybe [:map-of :keyword :string]]]
|
||||
[:ids [::sm/vec ::sm/uuid]]
|
||||
[:v-sizing {:optional true} [:maybe [:= :fill]]]])
|
||||
[:ids [::sm/vec ::sm/uuid]]])
|
||||
|
||||
(mf/defc layout-size-constraints*
|
||||
{::mf/private true
|
||||
::mf/schema (sm/schema schema:layout-size-constraints)}
|
||||
[{:keys [values v-sizing ids applied-tokens] :as props}]
|
||||
[{:keys [values ids applied-tokens] :as props}]
|
||||
(let [token-numeric-inputs
|
||||
(features/use-feature "tokens/numeric-input")
|
||||
|
||||
v-sizing
|
||||
(:layout-item-v-sizing values)
|
||||
|
||||
min-w (get values :layout-item-min-w)
|
||||
|
||||
max-w (get values :layout-item-max-w)
|
||||
@ -914,5 +916,4 @@
|
||||
(= v-sizing :fill))
|
||||
[:> layout-size-constraints* {:ids ids
|
||||
:values values
|
||||
:applied-tokens applied-tokens
|
||||
:v-sizing v-sizing}])])]))
|
||||
:applied-tokens applied-tokens}])])]))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user