chore: preferences view swipe gesture

This commit is contained in:
Aman Harwara
2023-05-16 15:07:20 +05:30
parent 46e87085d7
commit 0f641e05ad
5 changed files with 59 additions and 9 deletions

View File

@@ -114,7 +114,7 @@ const Modal = ({
) : (
<div
className={classNames(
'flex w-full flex-shrink-0 items-center justify-between rounded-t border-b border-solid border-border bg-default px-2 text-text md:px-4.5 md:py-3',
'flex w-full flex-shrink-0 select-none items-center justify-between rounded-t border-b border-solid border-border bg-default px-2 text-text md:px-4.5 md:py-3',
hasTopInset ? 'pt-safe-top pb-1.5' : 'py-1.5',
)}
>

View File

@@ -1,6 +1,8 @@
import { useLifecycleAnimation } from '@/Hooks/useLifecycleAnimation'
import { useMediaQuery, MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/useMediaQuery'
export const IosModalAnimationEasing = 'cubic-bezier(.36,.66,.04,1)'
export const useModalAnimation = (isOpen: boolean) => {
const isMobileScreen = useMediaQuery(MutuallyExclusiveMediaQueryBreakpoints.sm)
@@ -17,7 +19,7 @@ export const useModalAnimation = (isOpen: boolean) => {
},
],
options: {
easing: 'cubic-bezier(.36,.66,.04,1)',
easing: IosModalAnimationEasing,
duration: 250,
fill: 'forwards',
},
@@ -38,7 +40,7 @@ export const useModalAnimation = (isOpen: boolean) => {
},
],
options: {
easing: 'cubic-bezier(.36,.66,.04,1)',
easing: IosModalAnimationEasing,
duration: 250,
fill: 'forwards',
},