Fix: incorrect props passed to RN's style prop (#18435)
Fix 3 errors in the onboarding screen about unsupported props passed to the style prop.
1x ERROR Warning: Failed prop type: Invalid props.style key resizeMethod supplied to Image.
2x ERROR Warning: Failed prop type: Invalid props.style key size supplied to Text.
Related guideline:
563f1c588d/doc/new-guidelines.md (dont-define-properties-in-styles-ns)
This commit is contained in:
parent
ec2b95c370
commit
7e2c7abf30
|
@ -27,11 +27,11 @@
|
||||||
(defn background-image
|
(defn background-image
|
||||||
[content-width]
|
[content-width]
|
||||||
[rn/image
|
[rn/image
|
||||||
{:style {:resize-mode :stretch
|
{:resize-mode :stretch
|
||||||
:resize-method :scale
|
:resize-method :scale
|
||||||
:margin-top 32
|
:style {:margin-top 32
|
||||||
:width content-width}
|
:width content-width}
|
||||||
:source (resources/get-image :onboarding-illustration)}])
|
:source (resources/get-image :onboarding-illustration)}])
|
||||||
|
|
||||||
(defonce progress (atom nil))
|
(defonce progress (atom nil))
|
||||||
(defonce paused? (atom nil))
|
(defonce paused? (atom nil))
|
||||||
|
|
|
@ -12,12 +12,8 @@
|
||||||
:flex-wrap :wrap})
|
:flex-wrap :wrap})
|
||||||
|
|
||||||
(def plain-text
|
(def plain-text
|
||||||
{:size :paragraph-2
|
{:color colors/white-opa-70})
|
||||||
:weight :regular
|
|
||||||
:color colors/white-opa-70})
|
|
||||||
|
|
||||||
(def highlighted-text
|
(def highlighted-text
|
||||||
{:flex 1
|
{:flex 1
|
||||||
:size :paragraph-2
|
:color colors/white})
|
||||||
:weight :regular
|
|
||||||
:color colors/white})
|
|
||||||
|
|
|
@ -34,17 +34,20 @@
|
||||||
:heading (i18n/label :t/new-to-status)
|
:heading (i18n/label :t/new-to-status)
|
||||||
:accessibility-label :new-to-status-button}}
|
:accessibility-label :new-to-status-button}}
|
||||||
[quo/text
|
[quo/text
|
||||||
{:style style/plain-text}
|
{:size :paragraph-2
|
||||||
|
:weight :regular
|
||||||
|
:style style/plain-text}
|
||||||
(i18n/label :t/you-already-use-status)]
|
(i18n/label :t/you-already-use-status)]
|
||||||
[quo/text
|
[quo/text {:style style/text-container}
|
||||||
{:style style/text-container}
|
|
||||||
[quo/text
|
[quo/text
|
||||||
{:style style/plain-text}
|
{:size :paragraph-2
|
||||||
|
:weight :regular
|
||||||
|
:style style/plain-text}
|
||||||
(i18n/label :t/by-continuing-you-accept)]
|
(i18n/label :t/by-continuing-you-accept)]
|
||||||
[quo/text
|
[quo/text
|
||||||
{:on-press #(debounce/dispatch-and-chill
|
{:on-press #(debounce/dispatch-and-chill [:open-modal :privacy-policy] 1000)
|
||||||
[:open-modal :privacy-policy]
|
:size :paragraph-2
|
||||||
1000)
|
:weight :regular
|
||||||
:style style/highlighted-text}
|
:style style/highlighted-text}
|
||||||
(i18n/label :t/terms-of-service)]]]
|
(i18n/label :t/terms-of-service)]]]
|
||||||
[overlay/view]])
|
[overlay/view]])
|
||||||
|
|
Loading…
Reference in New Issue