first commit
This commit is contained in:
19
frontend/node_modules/rc-notification/es/hooks/useStack.js
generated
vendored
Normal file
19
frontend/node_modules/rc-notification/es/hooks/useStack.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
||||
var DEFAULT_OFFSET = 8;
|
||||
var DEFAULT_THRESHOLD = 3;
|
||||
var DEFAULT_GAP = 16;
|
||||
var useStack = function useStack(config) {
|
||||
var result = {
|
||||
offset: DEFAULT_OFFSET,
|
||||
threshold: DEFAULT_THRESHOLD,
|
||||
gap: DEFAULT_GAP
|
||||
};
|
||||
if (config && _typeof(config) === 'object') {
|
||||
var _config$offset, _config$threshold, _config$gap;
|
||||
result.offset = (_config$offset = config.offset) !== null && _config$offset !== void 0 ? _config$offset : DEFAULT_OFFSET;
|
||||
result.threshold = (_config$threshold = config.threshold) !== null && _config$threshold !== void 0 ? _config$threshold : DEFAULT_THRESHOLD;
|
||||
result.gap = (_config$gap = config.gap) !== null && _config$gap !== void 0 ? _config$gap : DEFAULT_GAP;
|
||||
}
|
||||
return [!!config, result];
|
||||
};
|
||||
export default useStack;
|
||||
Reference in New Issue
Block a user