mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 14:12:36 -05:00
Add form styling
This commit is contained in:
parent
8db47b5877
commit
941fb041b6
2 changed files with 18 additions and 2 deletions
|
@ -117,8 +117,15 @@
|
||||||
[:& tokens.common/labeled-input {:label "Value"
|
[:& tokens.common/labeled-input {:label "Value"
|
||||||
:input-props {:default-value @value
|
:input-props {:default-value @value
|
||||||
:on-change on-update-value}}]
|
:on-change on-update-value}}]
|
||||||
[:div {:class (stl/css :resolved-value)}
|
[:div {:class (stl/css-case :resolved-value true
|
||||||
[:p @resolved-value]]
|
:resolved-value-placeholder (nil? @token-resolve-result)
|
||||||
|
:resolved-value-error (when (keyword? @token-resolve-result)
|
||||||
|
(= (namespace @token-resolve-result) "error")))}
|
||||||
|
(case @token-resolve-result
|
||||||
|
:error/token-self-reference "Token has self reference"
|
||||||
|
:error/token-missing-reference "Token has missing reference"
|
||||||
|
nil "Enter token value"
|
||||||
|
[:p @token-resolve-result])]
|
||||||
[:& 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 %)}}]
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
@include bodySmallTypography;
|
@include bodySmallTypography;
|
||||||
padding: $s-4 $s-6;
|
padding: $s-4 $s-6;
|
||||||
font-weight: medium;
|
font-weight: medium;
|
||||||
|
height: $s-24;
|
||||||
|
|
||||||
color: var(--color-foreground-primary);
|
color: var(--color-foreground-primary);
|
||||||
border: 1px solid color-mix(in hsl, var(--color-foreground-secondary) 30%, transparent);
|
border: 1px solid color-mix(in hsl, var(--color-foreground-secondary) 30%, transparent);
|
||||||
|
@ -39,3 +40,11 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.resolved-value-placeholder {
|
||||||
|
color: var(--color-foreground-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.resolved-value-error {
|
||||||
|
color: var(--status-color-error-500);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue