fix: ensure we allow for description-top-text to fallback to default string

This commit is contained in:
Sean Hagstrom 2024-08-13 09:40:20 +01:00
parent 7dc3720c05
commit 2003f64bed
No known key found for this signature in database
GPG Key ID: 5257FEDF56307320
1 changed files with 17 additions and 18 deletions

View File

@ -58,7 +58,10 @@
:style {:color (colors/theme-colors colors/danger-50 colors/danger-60 theme)}}
error-message]])
(when (and (= description :top) (string? description-top-text) (or role context-tag-props))
(when (= description :top)
(if (vector? description-top-text)
description-top-text
(when (or role context-tag-props)
[rn/view {:style style/description-top}
[text/text
{:size :paragraph-2
@ -71,11 +74,7 @@
:icon (role role-icon)
:blur? blur?
:context (i18n/label (keyword "t" role))}
context-tag-props)]])
(when (and (= description :top)
(vector? description-top-text))
description-top-text)
context-tag-props)]])))
[rn/view {:style (style/buttons-container actions buttons-container-style)}
(when (or (= actions :two-actions)