mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-10 23:56:48 +00:00
fix: update use of setting-item component to match new api (#17244)
This commit is contained in:
parent
5d6800cee0
commit
6eb53ca2db
@ -8,12 +8,14 @@
|
|||||||
(if tag 72 icon-height)))
|
(if tag 72 icon-height)))
|
||||||
|
|
||||||
(defn container
|
(defn container
|
||||||
[{:keys [in-card? tag]}]
|
[{:keys [in-card? tag container-style]}]
|
||||||
{:padding-horizontal 12
|
(merge {:padding-horizontal 12
|
||||||
:padding-vertical (if in-card? 12 13)
|
:padding-top (if in-card? 12 13)
|
||||||
:flex-direction :row
|
:padding-bottom (if in-card? 12 13)
|
||||||
:justify-content :space-between
|
:flex-direction :row
|
||||||
:height (if tag 96 48)})
|
:justify-content :space-between
|
||||||
|
:height (if tag 96 48)}
|
||||||
|
container-style))
|
||||||
|
|
||||||
(def sub-container
|
(def sub-container
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
|
@ -62,7 +62,8 @@
|
|||||||
(case tag
|
(case tag
|
||||||
:positive [status-tags/status-tag
|
:positive [status-tags/status-tag
|
||||||
{:status {:type :positive}
|
{:status {:type :positive}
|
||||||
:label (i18n/label :t/positive)
|
:label (:label tag-props)
|
||||||
|
:no-icon? true
|
||||||
:size :small
|
:size :small
|
||||||
:container-style {:margin-top 8}}]
|
:container-style {:margin-top 8}}]
|
||||||
:context [context-tag/view
|
:context [context-tag/view
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
(:require [quo2.foundations.colors :as colors]))
|
(:require [quo2.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def device-container
|
(def device-container
|
||||||
{:padding-top 12
|
{:border-color colors/white-opa-5
|
||||||
:padding-horizontal 12
|
:border-radius 16
|
||||||
:padding-bottom 16
|
:border-width 1
|
||||||
:border-color colors/white-opa-5
|
:margin-top 12})
|
||||||
:border-radius 16
|
|
||||||
:border-width 1
|
|
||||||
:margin-top 12})
|
|
||||||
|
@ -16,21 +16,20 @@
|
|||||||
(cond->
|
(cond->
|
||||||
{:container-style style/device-container
|
{:container-style style/device-container
|
||||||
:title name
|
:title name
|
||||||
:override-theme :dark
|
:image :icon
|
||||||
:left-icon (cond (#{:mobile :ios :android} (keyword device-type))
|
:image-props (cond (#{:mobile :ios :android} (keyword device-type))
|
||||||
:i/mobile
|
:i/mobile
|
||||||
:else :i/desktop)}
|
:else :i/desktop)}
|
||||||
(and show-button? unpaired?) (assoc :button-props
|
(and show-button? unpaired?) (assoc
|
||||||
{:title (i18n/label :t/pair)
|
:action :button
|
||||||
:on-press #(js/alert "feature not added yet")})
|
:action-props
|
||||||
(and show-button? paired?) (assoc
|
{:title (i18n/label :t/pair)
|
||||||
:button-props
|
|
||||||
{:title (i18n/label :t/unpair)
|
|
||||||
:on-press #(js/alert "feature not added yet")})
|
:on-press #(js/alert "feature not added yet")})
|
||||||
|
(and show-button? paired?) (assoc
|
||||||
|
:action :button
|
||||||
|
:action-props
|
||||||
|
{:button-text (i18n/label :t/unpair)
|
||||||
|
:on-press #(js/alert "feature not added yet")})
|
||||||
this-device? (assoc
|
this-device? (assoc
|
||||||
:status-tag-props
|
:tag :positive
|
||||||
{:size :small
|
:tag-props {:label (i18n/label :t/this-device)}))]))
|
||||||
:status {:type :positive}
|
|
||||||
:no-icon? true
|
|
||||||
:label (i18n/label :t/this-device)
|
|
||||||
:override-theme :dark}))]))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user