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)))
|
||||
|
||||
(defn container
|
||||
[{:keys [in-card? tag]}]
|
||||
{:padding-horizontal 12
|
||||
:padding-vertical (if in-card? 12 13)
|
||||
:flex-direction :row
|
||||
:justify-content :space-between
|
||||
:height (if tag 96 48)})
|
||||
[{:keys [in-card? tag container-style]}]
|
||||
(merge {:padding-horizontal 12
|
||||
:padding-top (if in-card? 12 13)
|
||||
:padding-bottom (if in-card? 12 13)
|
||||
:flex-direction :row
|
||||
:justify-content :space-between
|
||||
:height (if tag 96 48)}
|
||||
container-style))
|
||||
|
||||
(def sub-container
|
||||
{:flex-direction :row
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
(case tag
|
||||
:positive [status-tags/status-tag
|
||||
{:status {:type :positive}
|
||||
:label (i18n/label :t/positive)
|
||||
:label (:label tag-props)
|
||||
:no-icon? true
|
||||
:size :small
|
||||
:container-style {:margin-top 8}}]
|
||||
:context [context-tag/view
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(def device-container
|
||||
{:padding-top 12
|
||||
:padding-horizontal 12
|
||||
:padding-bottom 16
|
||||
:border-color colors/white-opa-5
|
||||
:border-radius 16
|
||||
:border-width 1
|
||||
:margin-top 12})
|
||||
{:border-color colors/white-opa-5
|
||||
:border-radius 16
|
||||
:border-width 1
|
||||
:margin-top 12})
|
||||
|
|
|
@ -16,21 +16,20 @@
|
|||
(cond->
|
||||
{:container-style style/device-container
|
||||
:title name
|
||||
:override-theme :dark
|
||||
:left-icon (cond (#{:mobile :ios :android} (keyword device-type))
|
||||
:image :icon
|
||||
:image-props (cond (#{:mobile :ios :android} (keyword device-type))
|
||||
:i/mobile
|
||||
:else :i/desktop)}
|
||||
(and show-button? unpaired?) (assoc :button-props
|
||||
{:title (i18n/label :t/pair)
|
||||
:on-press #(js/alert "feature not added yet")})
|
||||
(and show-button? paired?) (assoc
|
||||
:button-props
|
||||
{:title (i18n/label :t/unpair)
|
||||
(and show-button? unpaired?) (assoc
|
||||
:action :button
|
||||
:action-props
|
||||
{:title (i18n/label :t/pair)
|
||||
: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
|
||||
:status-tag-props
|
||||
{:size :small
|
||||
:status {:type :positive}
|
||||
:no-icon? true
|
||||
:label (i18n/label :t/this-device)
|
||||
:override-theme :dark}))]))
|
||||
:tag :positive
|
||||
:tag-props {:label (i18n/label :t/this-device)}))]))
|
||||
|
|
Loading…
Reference in New Issue