UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

42 lines (37 loc) 1.45 kB
import '../../utils/index.js'; import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js'; var getCollapsibleBodyContentBoxProps = function getCollapsibleBodyContentBoxProps(_ref) { var direction = _ref.direction, _hasMargin = _ref._hasMargin; if (!_hasMargin) { return {}; } return { /** * Need a margin inside the outside wrapper so this is * included in height calculations and prevents jank */ marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0', marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0' }; }; var getOpacity = function getOpacity(_ref2) { var isExpanded = _ref2.isExpanded; return isExpanded ? 1 : 0.8; }; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type var getTransitionDuration = function getTransitionDuration(theme) { return makeMotionTime(theme.motion.duration.moderate); }; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type var getTransitionEasing = function getTransitionEasing(theme) { return theme.motion.easing.standard; }; var getCollapsibleChevronIconTransforms = function getCollapsibleChevronIconTransforms() { return { transformExpanded: -180, transformCollapsed: 0 }; }; export { getCollapsibleBodyContentBoxProps, getCollapsibleChevronIconTransforms, getOpacity, getTransitionDuration, getTransitionEasing }; //# sourceMappingURL=commonStyles.js.map