Fix swaps received value UI bug (#21724)

* fix: use text instead of input for received value

* fix: using input-disabled? instead of pay?
This commit is contained in:
Lungu Cristian 2024-12-03 11:49:15 +02:00 committed by GitHub
parent f7c930964c
commit d941029661
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 21 deletions

View File

@ -121,16 +121,17 @@
[linear-gradient/linear-gradient
{:start {:x 0 :y 0}
:end {:x 1 :y 0}
:colors [(colors/theme-colors colors/white colors/neutral-100 theme)
(colors/theme-colors colors/white-opa-10 colors/neutral-100-opa-10 theme)]
:colors [(colors/theme-colors colors/white colors/neutral-95 theme)
(colors/theme-colors colors/white-opa-10 colors/neutral-95-opa-10 theme)]
:style style/gradient-start}])
(when (and overflow? disabled?)
[linear-gradient/linear-gradient
{:start {:x 0 :y 0}
:end {:x 1 :y 0}
:colors [(colors/theme-colors colors/white-opa-10 colors/neutral-100-opa-10 theme)
(colors/theme-colors colors/white colors/neutral-100 theme)]
:colors [(colors/theme-colors colors/white-opa-10 colors/neutral-95-opa-10 theme)
(colors/theme-colors colors/white colors/neutral-95 theme)]
:style style/gradient-end}])
(if-not input-disabled?
[rn/text-input
(cond-> {:ref set-input-ref
:style (style/input disabled? error? theme)
@ -147,7 +148,11 @@
:show-soft-input-on-focus show-keyboard?
:default-value default-value
:placeholder "0"}
controlled-input? (assoc :value value))]]
controlled-input? (assoc :value value))]
[rn/text
{:style (style/input disabled? error? theme)
:on-layout on-layout-text-input}
(or value "0")])]
[text/text
{:size :paragraph-2
:weight :semi-bold

View File

@ -91,6 +91,7 @@
;;95 with transparency
(def neutral-95-opa-0 (alpha neutral-95 0))
(def neutral-95-opa-10 (alpha neutral-95 0.1))
(def neutral-95-opa-60 (alpha neutral-95 0.6))
(def neutral-95-opa-70 (alpha neutral-95 0.7))
(def neutral-95-opa-80 (alpha neutral-95 0.8))