UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

17 lines (14 loc) 1.12 kB
import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated'; import 'react'; import getIn from '../../../utils/lodashButBetter/get.js'; import '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 '../../BottomSheet/BottomSheetStack.js'; import { jsx } from 'react/jsx-runtime'; var AnimatedButtonContent=function AnimatedButtonContent(_ref){var motionDuration=_ref.motionDuration,motionEasing=_ref.motionEasing,children=_ref.children,isPressed=_ref.isPressed;var _useTheme=useTheme(),theme=_useTheme.theme;var duration=getIn(theme.motion,motionDuration);var easing=getIn(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){return {transform:[{scale:withTiming(isPressed?0.95:1,{duration:duration,easing:easing})}]};},[isPressed]);return jsx(Animated.View,{style:animatedStyles,children:children});}; export { AnimatedButtonContent as default }; //# sourceMappingURL=AnimatedButtonContent.native.js.map