intro wizard indicator fix

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-01-11 13:45:08 +01:00
parent e0b01d2fed
commit 2af23bcb2e
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
1 changed files with 5 additions and 1 deletions

View File

@ -6,12 +6,16 @@
[status-im.i18n :as i18n]
[status-im.ui.screens.intro.styles :as styles]))
(defn code [val]
^{:key val}
[animated/code {:exec val}])
(defn dot []
(let [active (animated/value 0)
active-transition (animated/with-timing-transition active {:duration 100})]
(fn [{:keys [selected progress]}]
[animated/view {:style (styles/dot-style active-transition)}
[animated/code {:exec (animated/set active (if selected 1 0))}]
[code (animated/set active (if selected 1 0))]
[animated/view {:style (styles/dot-progress active-transition progress)}]])))
(defn dots-selector [{:keys [n selected progress]}]