0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 14:12:36 -05:00

Reestore fields

This commit is contained in:
Florian Schroedl 2024-06-19 17:17:00 +02:00
parent 0830a26be9
commit 885322d479
3 changed files with 8 additions and 11 deletions

View file

@ -43,6 +43,6 @@
"data-lpignore" true "data-lpignore" true
:auto-complete "off"))] :auto-complete "off"))]
[:label {:class (stl/css-case :labeled-input true [:label {:class (stl/css-case :labeled-input true
:error error?)} :labeled-input-error error?)}
[:span {:class (stl/css :label)} label] [:span {:class (stl/css :label)} label]
[:& :input input-props]])) [:& :input input-props]]))

View file

@ -180,20 +180,16 @@
:on-change on-update-name}}] :on-change on-update-name}}]
(when-let [errors (:errors/name state)] (when-let [errors (:errors/name state)]
[:p {:class (stl/css :error)} (me/humanize errors)])] [:p {:class (stl/css :error)} (me/humanize errors)])]
#_(for [[idx {:keys [label type value]}] (d/enumerate (:fields state))] [:& tokens.common/labeled-input {:label "Value"
[:* {:key (str "form-field-" idx)} :input-props {:default-value (:value state)
(case type #_#_:on-change #(on-update-field idx %)}}]
:box-shadow [:p "TODO BOX SHADOW"]
[:& tokens.common/labeled-input {:label "Value"
:input-props {:default-value value
:on-change #(on-update-field idx %)}}])])
;; (when (and @resolved-value ;; (when (and @resolved-value
;; (not= @resolved-value (:value (first @state*)))) ;; (not= @resolved-value (:value (first @state*))))
;; [:div {:class (stl/css :resolved-value)} ;; [:div {:class (stl/css :resolved-value)}
;; [:p @resolved-value]]) ;; [:p @resolved-value]])
#_[:& tokens.common/labeled-input {:label "Description" [:& tokens.common/labeled-input {:label "Description"
:input-props {:default-value (:description state) :input-props {:default-value (:description state)
:on-change #(on-update-description %)}}] #_#_:on-change #(on-update-description %)}}]
[:div {:class (stl/css :button-row)} [:div {:class (stl/css :button-row)}
[:button {:class (stl/css :button) [:button {:class (stl/css :button)
:type "submit" :type "submit"

View file

@ -22,6 +22,7 @@
.error { .error {
@include bodySmallTypography; @include bodySmallTypography;
margin-top: $s-6; margin-top: $s-6;
margin-bottom: 0;
color: var(--status-color-error-500); color: var(--status-color-error-500);
} }