-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4388 from tloncorp/po/remove-expo-blur
Remove expo blur to unblock release
- Loading branch information
Showing
6 changed files
with
68 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,9 @@ | ||
import { BlurView } from 'expo-blur'; | ||
import { ComponentProps, PropsWithChildren } from 'react'; | ||
import { XStack, YStack, styled } from 'tamagui'; | ||
|
||
import useIsWindowNarrow from '../../hooks/useIsWindowNarrow'; | ||
import { YStack, styled } from 'tamagui'; | ||
|
||
const ListFrame = styled(YStack, { | ||
overflow: 'hidden', | ||
borderRadius: '$m', | ||
backgroundColor: '$secondaryBackground', | ||
}); | ||
|
||
const ListFrameComponent = ( | ||
props: PropsWithChildren< | ||
ComponentProps<typeof XStack> & ComponentProps<typeof BlurView> | ||
> | ||
) => { | ||
const { children, intensity, tint, ...rest } = props; | ||
const isWindowNarrow = useIsWindowNarrow(); | ||
|
||
if (!isWindowNarrow) { | ||
// Blur view adds a shadow, we don't want that in the modal that's | ||
// rendered on desktop | ||
return <ListFrame {...rest}>{children}</ListFrame>; | ||
} | ||
|
||
return ( | ||
<ListFrame {...rest}> | ||
<BlurView | ||
style={{ flex: 1 }} | ||
intensity={intensity ?? 80} | ||
tint={tint ?? 'extraLight'} | ||
> | ||
{children} | ||
</BlurView> | ||
</ListFrame> | ||
); | ||
}; | ||
|
||
export default ListFrameComponent; | ||
export default ListFrame; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.