UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

42 lines (38 loc) 1.32 kB
import '../../utils/index.js'; import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js'; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type var getTransitionDuration = function getTransitionDuration(theme) { return makeMotionTime(theme.motion.duration['2xquick']); }; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type var getTransitionEasing = function getTransitionEasing(theme) { return theme.motion.easing.standard; }; var getBackgroundColor = function getBackgroundColor(_ref) { var theme = _ref.theme, isExpanded = _ref.isExpanded, isActive = _ref.isActive; var gray = theme.colors.interactive.background.gray; if (isExpanded) { if (isActive) { return gray.fadedHighlighted; } return gray.faded; } if (isActive) { return gray.faded; } return theme.colors.transparent; }; var getCommonAccordionButtonStyles = function getCommonAccordionButtonStyles(props) { var theme = props.theme; return { padding: theme.spacing[0], display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }; }; export { getBackgroundColor, getCommonAccordionButtonStyles, getTransitionDuration, getTransitionEasing }; //# sourceMappingURL=commonStyles.js.map