refactor to accept background-color property (#13764)

Refactoring copyable-text component to accept background-color property.

Fix case of nil

Trying to sign
This commit is contained in:
Siddarth Kumar 2022-08-19 20:50:45 +05:30 committed by GitHub
parent 2c1bfcd092
commit be8db33349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@
(defn copyable-text-view
[{:keys [label container-style]} content]
(let [cue-atom (reagent/atom false)
background-color (or (get container-style :background-color) colors/white)
width (reagent/atom 0)
height (reagent/atom 0)
anim-y (animation/create-value 0)
@ -120,5 +121,5 @@
:underlay-color colors/black
:on-press copy-fn
:on-long-press copy-fn}
[react/view {:background-color colors/white}
[react/view {:background-color background-color}
content]]]))})))