UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

18 lines (15 loc) 1.36 kB
import 'react'; import Animated, { Keyframe } from 'react-native-reanimated'; import styled from 'styled-components/native'; import '@gorhom/portal'; import 'react-native-gesture-handler'; import useTheme from '../../BladeProvider/useTheme.js'; import 'react-native'; import '@babel/runtime/helpers/slicedToArray'; import '../../../tokens/global/typography.js'; import '../../../tokens/global/motion.js'; import '../../BottomSheet/BottomSheetStack.js'; import { jsx } from 'react/jsx-runtime'; var StyledFade=styled(Animated.View)(function(_ref){var styles=_ref.styles;return Object.assign({},styles);});var Fade=function Fade(_ref2){var children=_ref2.children,show=_ref2.show,styles=_ref2.styles;var _useTheme=useTheme(),theme=_useTheme.theme;var fadeInEasing=theme.motion.easing.entrance;var fadeOutEasing=theme.motion.easing.exit;var fadeIn=new Keyframe({from:{transform:[{scale:0.6}],opacity:0,easing:fadeInEasing},to:{transform:[{scale:1}],opacity:1,easing:fadeInEasing}}).duration(theme.motion.duration.quick);var fadeOut=new Keyframe({from:{transform:[{scale:1}],opacity:1,easing:fadeOutEasing},to:{transform:[{scale:0.6}],opacity:0,easing:fadeOutEasing}}).duration(theme.motion.duration.quick);return show?jsx(StyledFade,{styles:styles,entering:fadeIn,exiting:fadeOut,children:children}):null;}; export { Fade }; //# sourceMappingURL=Fade.native.js.map