UNPKG

rc-notification

Version:
19 lines 820 B
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;