UNPKG

react-biz

Version:

React components for Business

34 lines (28 loc) 1.08 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)', easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)', easeOut: function easeOut(duration, property, delay, easeFunction) { var cEaseFunction = easeFunction || this.easeOutFunction; if (property && Object.prototype.toString.call(property) === '[object Array]') { var transitions = ''; for (var i = 0; i < property.length; i++) { if (transitions) transitions += ','; transitions += this.create(duration, property[i], delay, cEaseFunction); } return transitions; } else { return this.create(duration, property, delay, easeFunction); } }, create: function create(duration, property, delay, easeFunction) { var cDuration = duration || '450ms'; var cProperty = property || 'all'; var cDelay = delay || '0ms'; var cEaseFunction = easeFunction || 'linear'; return cProperty + ' ' + cDuration + ' ' + cEaseFunction + ' ' + cDelay; } };