Use blurred background for all type `shell?` bottom sheets (#18400)

This commit is contained in:
Ibrahem Khalil 2024-02-13 22:54:43 +02:00 committed by GitHub
parent 5fdaf0054d
commit 357db52720
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View File

@ -63,7 +63,7 @@
item-height (reagent/atom 0)]
(fn [{:keys [hide? insets theme]}
{:keys [content selected-item padding-bottom-override border-radius on-close shell?
gradient-cover? customization-color hide-handle?]
gradient-cover? customization-color hide-handle? blur-radius]
:or {border-radius 12}}]
(let [{window-height :height} (rn/get-window)
bg-opacity (reanimated/use-shared-value 0)
@ -106,7 +106,11 @@
{:transform [{:translateY translate-y}]}
(style/sheet insets window-height selected-item))}
(when shell?
[blur/ios-view {:style style/shell-bg}])
[blur/ios-view
{:style style/shell-bg
:blur-radius (or blur-radius 20)
:blur-type :transparent
:overlay-color :transparent}])
(when selected-item
[rn/view
{:on-layout #(reset! item-height (.-nativeEvent.layout.height ^js %))

View File

@ -40,9 +40,10 @@
:size 32
:accessibility-label :activity-center-open-more
:on-press #(rf/dispatch [:show-bottom-sheet
{:content drawer/options
:theme :dark
:shell? true}])}
{:content drawer/options
:theme :dark
:shell? true
:blur-radius 20}])}
:i/options]]
[quo/text
{:size :heading-1