UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

30 lines (27 loc) 1.63 kB
import _defineProperty from '@babel/runtime/helpers/defineProperty'; import { tableRow, classes, tableBackgroundColor } from './tokens.js'; import '../../utils/index.js'; import getIn from '../../utils/lodashButBetter/get.js'; import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js'; var getTableRowBackgroundTransition = function getTableRowBackgroundTransition(theme) { var rowBackgroundTransition = "background-color ".concat(makeMotionTime(getIn(theme.motion, tableRow.backgroundColorMotionDuration)), " ").concat(getIn(theme.motion, tableRow.backgroundColorMotionEasing)); return rowBackgroundTransition; }; var getTableActionsHoverStyles = function getTableActionsHoverStyles(_ref) { var hoverColor = _ref.hoverColor, theme = _ref.theme, backgroundGradientColor = _ref.backgroundGradientColor; var rowBackgroundTransition = getTableRowBackgroundTransition(theme); return _defineProperty(_defineProperty(_defineProperty({}, "& .".concat(classes.HOVER_ACTIONS), { backgroundColor: getIn(theme.colors, tableBackgroundColor), transition: rowBackgroundTransition }), "& .".concat(classes.HOVER_ACTIONS_LAYER2), { backgroundColor: getIn(theme.colors, backgroundGradientColor !== null && backgroundGradientColor !== void 0 ? backgroundGradientColor : 'transparent'), transition: rowBackgroundTransition }), "& .".concat(classes.HOVER_ACTIONS_LAYER3), { backgroundColor: getIn(theme.colors, hoverColor), transition: rowBackgroundTransition }); }; export { getTableActionsHoverStyles, getTableRowBackgroundTransition }; //# sourceMappingURL=utils.js.map