Use blurred background for all type `shell?` bottom sheets (#18400)
This commit is contained in:
parent
5fdaf0054d
commit
357db52720
|
@ -63,7 +63,7 @@
|
||||||
item-height (reagent/atom 0)]
|
item-height (reagent/atom 0)]
|
||||||
(fn [{:keys [hide? insets theme]}
|
(fn [{:keys [hide? insets theme]}
|
||||||
{:keys [content selected-item padding-bottom-override border-radius on-close shell?
|
{: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}}]
|
:or {border-radius 12}}]
|
||||||
(let [{window-height :height} (rn/get-window)
|
(let [{window-height :height} (rn/get-window)
|
||||||
bg-opacity (reanimated/use-shared-value 0)
|
bg-opacity (reanimated/use-shared-value 0)
|
||||||
|
@ -106,7 +106,11 @@
|
||||||
{:transform [{:translateY translate-y}]}
|
{:transform [{:translateY translate-y}]}
|
||||||
(style/sheet insets window-height selected-item))}
|
(style/sheet insets window-height selected-item))}
|
||||||
(when shell?
|
(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
|
(when selected-item
|
||||||
[rn/view
|
[rn/view
|
||||||
{:on-layout #(reset! item-height (.-nativeEvent.layout.height ^js %))
|
{:on-layout #(reset! item-height (.-nativeEvent.layout.height ^js %))
|
||||||
|
|
|
@ -40,9 +40,10 @@
|
||||||
:size 32
|
:size 32
|
||||||
:accessibility-label :activity-center-open-more
|
:accessibility-label :activity-center-open-more
|
||||||
:on-press #(rf/dispatch [:show-bottom-sheet
|
:on-press #(rf/dispatch [:show-bottom-sheet
|
||||||
{:content drawer/options
|
{:content drawer/options
|
||||||
:theme :dark
|
:theme :dark
|
||||||
:shell? true}])}
|
:shell? true
|
||||||
|
:blur-radius 20}])}
|
||||||
:i/options]]
|
:i/options]]
|
||||||
[quo/text
|
[quo/text
|
||||||
{:size :heading-1
|
{:size :heading-1
|
||||||
|
|
Loading…
Reference in New Issue