mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Reestore fields
This commit is contained in:
parent
0830a26be9
commit
885322d479
3 changed files with 8 additions and 11 deletions
|
@ -43,6 +43,6 @@
|
|||
"data-lpignore" true
|
||||
:auto-complete "off"))]
|
||||
[:label {:class (stl/css-case :labeled-input true
|
||||
:error error?)}
|
||||
:labeled-input-error error?)}
|
||||
[:span {:class (stl/css :label)} label]
|
||||
[:& :input input-props]]))
|
||||
|
|
|
@ -180,20 +180,16 @@
|
|||
:on-change on-update-name}}]
|
||||
(when-let [errors (:errors/name state)]
|
||||
[:p {:class (stl/css :error)} (me/humanize errors)])]
|
||||
#_(for [[idx {:keys [label type value]}] (d/enumerate (:fields state))]
|
||||
[:* {:key (str "form-field-" idx)}
|
||||
(case type
|
||||
:box-shadow [:p "TODO BOX SHADOW"]
|
||||
[:& tokens.common/labeled-input {:label "Value"
|
||||
:input-props {:default-value value
|
||||
:on-change #(on-update-field idx %)}}])])
|
||||
[:& tokens.common/labeled-input {:label "Value"
|
||||
:input-props {:default-value (:value state)
|
||||
#_#_:on-change #(on-update-field idx %)}}]
|
||||
;; (when (and @resolved-value
|
||||
;; (not= @resolved-value (:value (first @state*))))
|
||||
;; [:div {:class (stl/css :resolved-value)}
|
||||
;; [:p @resolved-value]])
|
||||
#_[:& tokens.common/labeled-input {:label "Description"
|
||||
:input-props {:default-value (:description state)
|
||||
:on-change #(on-update-description %)}}]
|
||||
[:& tokens.common/labeled-input {:label "Description"
|
||||
:input-props {:default-value (:description state)
|
||||
#_#_:on-change #(on-update-description %)}}]
|
||||
[:div {:class (stl/css :button-row)}
|
||||
[:button {:class (stl/css :button)
|
||||
:type "submit"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
.error {
|
||||
@include bodySmallTypography;
|
||||
margin-top: $s-6;
|
||||
margin-bottom: 0;
|
||||
color: var(--status-color-error-500);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue