Skip to content

Commit

Permalink
marked optional params optional, attempt to fix disabling blur
Browse files Browse the repository at this point in the history
  • Loading branch information
laurens-lamberts committed Feb 1, 2025
1 parent bd87bc9 commit 2adaabb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- marked optional params optional
- attempt to fix disabling blur

## [0.1.15-1] - 2025-02-01

- Updated dev dependencies
Expand Down
10 changes: 7 additions & 3 deletions package/src/components/PopoutRootView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type OnElementTapType = {
popoutTileData: PopoutTileType;
overlayConfig: OverlayConfigType;
OverlayComponent: FC;
CloseButtonComponent: CloseButtonComponentType;
CloseButtonComponent?: CloseButtonComponentType;
onClose?: () => void;
};

Expand Down Expand Up @@ -132,7 +132,9 @@ const PopoutRootView = ({ children }: { children: ReactNode }) => {

setOverlayConfig(combinedConfig);
overlayComponent.current = _OverlayComponent;
closeButtonComponent.current = _CloseButtonComponent;
if (!!_CloseButtonComponent) {
closeButtonComponent.current = _CloseButtonComponent;
}

if (onClose) {
onCloseCallbackRef.current = onClose;
Expand Down Expand Up @@ -207,7 +209,9 @@ const PopoutRootView = ({ children }: { children: ReactNode }) => {
),
}));
const blur = useDerivedValue(() =>
interpolate(backdropProgress.value, [0, 1], [0, 8], Extrapolation.CLAMP)
overlayConfig.backdropBlur
? interpolate(backdropProgress.value, [0, 1], [0, 8], Extrapolation.CLAMP)
: 0
);

const overviewRef = useRef<View>(null);
Expand Down
8 changes: 4 additions & 4 deletions package/src/components/PopoutTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ const TILE_HEIGHT_DEFAULT = 160;
const TILE_WIDTH_DEFAULT = 108;

interface Props extends OverlayConfigType {
onTap: () => void;
onClose: () => void;
item: PopoutTileType;
OverlayComponent: FC;
onTap?: () => void;
onClose?: () => void;
style?: ViewStyle;
fadeIn?: boolean;
children?: ReactNode;
OverlayComponent: FC;
CloseButtonComponent: CloseButtonComponentType;
CloseButtonComponent?: CloseButtonComponentType;
}

const PopoutTile = ({
Expand Down

0 comments on commit 2adaabb

Please sign in to comment.