UNPKG

tdesign-react

Version:
61 lines (55 loc) 2.26 kB
/** * tdesign v1.11.6 * (c) 2025 tdesign * @license MIT */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var React = require('react'); var hooks_useConfig = require('./useConfig.js'); var configProvider_ConfigContext = require('../config-provider/ConfigContext.js'); require('../_chunks/dep-56a79f9c.js'); require('../_chunks/dep-5b35215f.js'); require('../_chunks/dep-fa2097c1.js'); require('../_chunks/dep-f6f16bd8.js'); require('dayjs'); require('../_chunks/dep-59bb0827.js'); require('../_chunks/dep-68f8743f.js'); require('../_chunks/dep-a8d0483a.js'); require('../_chunks/dep-6e34d7d7.js'); require('../_chunks/dep-d45b3350.js'); require('../_chunks/dep-ec3beb8d.js'); require('../_chunks/dep-b7e21379.js'); require('../_chunks/dep-73937edb.js'); require('../_chunks/dep-8d4e8f1c.js'); require('../_chunks/dep-1d022321.js'); require('../_chunks/dep-ab08e148.js'); require('../_chunks/dep-9df70348.js'); require('../_chunks/dep-af16359b.js'); require('../_chunks/dep-e11afe29.js'); require('../_chunks/dep-346ac5f4.js'); require('../_chunks/dep-612ec5c9.js'); require('../_chunks/dep-4d25d6c0.js'); require('../_chunks/dep-496c0353.js'); require('../_chunks/dep-1f530d81.js'); require('../_chunks/dep-a4bc3144.js'); require('../_chunks/dep-535a3b69.js'); require('../_chunks/dep-d11b328f.js'); function useAnimation() { var _useConfig = hooks_useConfig["default"](), animation = _useConfig.animation; var expand = configProvider_ConfigContext.EAnimationType.expand, ripple = configProvider_ConfigContext.EAnimationType.ripple, fade = configProvider_ConfigContext.EAnimationType.fade; var keepAnimation = React.useCallback(function (type) { var _animation$exclude, _animation$include; return animation && !((_animation$exclude = animation.exclude) !== null && _animation$exclude !== void 0 && _animation$exclude.includes(type)) && ((_animation$include = animation.include) === null || _animation$include === void 0 ? void 0 : _animation$include.includes(type)); }, [animation]); return { keepExpand: keepAnimation(expand), keepRipple: keepAnimation(ripple), keepFade: keepAnimation(fade) }; } exports["default"] = useAnimation; //# sourceMappingURL=useAnimation.js.map