/
githubmirror
/
react-beautiful-dnd
Обзор
Документация
Войти
/
githubmirror
/
react-beautiful-dnd
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/state/middleware/style.js
22 строки
607 B
Alex Reardon
12.0 (#1487)
29 окт 2019, 01:40
Не верифицирован
29 окт 2019, 01:40
24a8e60
Код
Авторство
О чём код?
// @flow import type { Action, Dispatch } from '../store-types'; import type { StyleMarshal } from '../../view/use-style-marshal/style-marshal-types'; export default (marshal: StyleMarshal) => () => (next: Dispatch) => ( action: Action, ): any => { if (action.type === 'INITIAL_PUBLISH') { marshal.dragging(); } if (action.type === 'DROP_ANIMATE') { marshal.dropping(action.payload.completed.result.reason); } // this will clear any styles immediately before a reorder if (action.type === 'FLUSH' || action.type === 'DROP_COMPLETE') { marshal.resting(); } next(action); };