Add `buttons-style` prop to bottom actions to allow same button dimensions
This commit is contained in:
parent
0f036ca9c4
commit
d2d17bb57f
|
@ -31,7 +31,8 @@
|
||||||
[:scroll? {:optional true} [:maybe :boolean]]
|
[:scroll? {:optional true} [:maybe :boolean]]
|
||||||
[:blur? {:optional true} [:maybe :boolean]]
|
[:blur? {:optional true} [:maybe :boolean]]
|
||||||
[:container-style {:optional true} [:maybe :map]]
|
[:container-style {:optional true} [:maybe :map]]
|
||||||
[:buttons-container-style {:optional true} [:maybe :map]]]]]
|
[:buttons-container-style {:optional true} [:maybe :map]]
|
||||||
|
[:buttons-style {:optional true} [:maybe :map]]]]]
|
||||||
:any])
|
:any])
|
||||||
|
|
||||||
(def ^:private role-icon
|
(def ^:private role-icon
|
||||||
|
@ -43,10 +44,9 @@
|
||||||
(defn- view-internal
|
(defn- view-internal
|
||||||
[{:keys [actions description description-text description-top-text error-message role button-one-label
|
[{:keys [actions description description-text description-top-text error-message role button-one-label
|
||||||
button-two-label blur? button-one-props button-two-props scroll? container-style
|
button-two-label blur? button-one-props button-two-props scroll? container-style
|
||||||
buttons-container-style context-tag-props]}]
|
buttons-container-style buttons-style context-tag-props]}]
|
||||||
(let [theme (quo.theme/use-theme)]
|
(let [theme (quo.theme/use-theme)]
|
||||||
[rn/view
|
[rn/view {:style (merge (style/container scroll? blur? theme) container-style)}
|
||||||
{:style (merge (style/container scroll? blur? theme) container-style)}
|
|
||||||
(when (= description :top-error)
|
(when (= description :top-error)
|
||||||
[rn/view {:style style/error-message}
|
[rn/view {:style style/error-message}
|
||||||
[icon/icon
|
[icon/icon
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
[button/button
|
[button/button
|
||||||
(merge
|
(merge
|
||||||
{:size 40
|
{:size 40
|
||||||
:container-style style/button-container
|
:container-style (merge style/button-container buttons-style)
|
||||||
:background (when (or blur? scroll?) :blur)
|
:background (when (or blur? scroll?) :blur)
|
||||||
:theme theme
|
:theme theme
|
||||||
:accessibility-label :button-two}
|
:accessibility-label :button-two}
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
[button/button
|
[button/button
|
||||||
(merge
|
(merge
|
||||||
{:size 40
|
{:size 40
|
||||||
:container-style style/button-container
|
:container-style (merge style/button-container buttons-style)
|
||||||
:background (when (or blur? scroll?) :blur)
|
:background (when (or blur? scroll?) :blur)
|
||||||
:theme theme
|
:theme theme
|
||||||
:accessibility-label :button-one}
|
:accessibility-label :button-one}
|
||||||
|
|
Loading…
Reference in New Issue