Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -13,7 +13,7 @@ import Animated, {
|
||||
withTiming,
|
||||
} from 'react-native-reanimated'
|
||||
|
||||
import {isIOS, isWeb} from '#/platform/detection'
|
||||
import {IS_IOS, IS_WEB} from '#/env'
|
||||
|
||||
type AccordionAnimationProps = React.PropsWithChildren<{
|
||||
isExpanded: boolean
|
||||
@@ -66,12 +66,12 @@ function MobileAccordion({
|
||||
style={style}
|
||||
entering={FadeInUp.duration(duration)}
|
||||
exiting={FadeOutUp.duration(duration / 2)}
|
||||
pointerEvents={isIOS ? 'auto' : 'box-none'}>
|
||||
pointerEvents={IS_IOS ? 'auto' : 'box-none'}>
|
||||
{children}
|
||||
</Animated.View>
|
||||
)
|
||||
}
|
||||
|
||||
export function AccordionAnimation(props: AccordionAnimationProps) {
|
||||
return isWeb ? <WebAccordion {...props} /> : <MobileAccordion {...props} />
|
||||
return IS_WEB ? <WebAccordion {...props} /> : <MobileAccordion {...props} />
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ import Animated, {
|
||||
} from 'react-native-reanimated'
|
||||
|
||||
import {isTouchDevice} from '#/lib/browser'
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {IS_NATIVE} from '#/env'
|
||||
|
||||
const DEFAULT_TARGET_SCALE = isNative || isTouchDevice ? 0.98 : 1
|
||||
const DEFAULT_TARGET_SCALE = IS_NATIVE || isTouchDevice ? 0.98 : 1
|
||||
|
||||
const AnimatedPressable = Animated.createAnimatedComponent(Pressable)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user