This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DIRECTIONS = { | |
TOP: 'top', | |
BOTTOM: 'bottom', | |
}; | |
// анимация | |
const linear = t => t; | |
const scrollElement = (scrollParams) => { | |
// что скролим |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const promiseLatest = (promiseFunction) => { | |
let lastPromise = null; | |
const ifDo = (condition, action) => data => condition() && action(data); | |
const processingPromiseHandler = scopedPromise => (resolve, reject) => scopedPromise | |
.then(ifDo(() => scopedPromise === lastPromise, resolve)) | |
.catch(ifDo(() => scopedPromise === lastPromise, reject)); | |
return (...args) => { | |
lastPromise = promiseFunction(...args); | |
return new Promise(processingPromiseHandler(lastPromise)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Moment = require('moment'); | |
const MomentRange = require('moment-range'); | |
require('moment-recur'); | |
export const moment = MomentRange.extendMoment(Moment); | |
export const DAY_SLOT = 'day' | |
export const HOUR_SLOT = 'hour' | |
export const SECOND_SLOT = 'second' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
primary: { | |
'primary-800': '#1565C0', | |
'primary-700': '#1976D2', | |
'primary-600': '#1E88E5', | |
'primary-500': '#2196F3', | |
'primary-400': '#42A5F5', | |
'primary-300': '#64B5F6', | |
}, | |
danger: { |