dt-design-system
Advanced tools
Comparing version 3.10.24 to 3.10.25
@@ -24,4 +24,3 @@ "use client"; | ||
const [closingTimeout, setClosingTimeout] = React.useState(); | ||
const delay = snackbar?.delay || DEFAULT_DELAY; | ||
const hide = () => { | ||
const hide = React.useCallback(() => { | ||
clearTimeout(closingTimeout); | ||
@@ -35,4 +34,5 @@ setClosing(true); | ||
}, CLOSING_DELAY)); | ||
}; | ||
const show = (options = {}) => { | ||
}, [closingTimeout]); | ||
const show = React.useCallback((options = {}) => { | ||
const delay = options?.delay || DEFAULT_DELAY; | ||
clearTimeout(visibilityTimeout); | ||
@@ -59,3 +59,3 @@ clearTimeout(delayedVisibilityTimeout); | ||
} | ||
}; | ||
}, [delayedVisibilityTimeout, hide, snackbar, visibilityTimeout]); | ||
return (_jsxs(SnackbarContext.Provider, { value: { show, hide }, children: [children, snackbar && (_jsx(Snackbar, { ...snackbar, closing: closing, close: hide }, uniqueId))] })); | ||
@@ -62,0 +62,0 @@ } |
{ | ||
"name": "dt-design-system", | ||
"version": "3.10.24", | ||
"version": "3.10.25", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "packageManager": "bun@1.10.0", |
Sorry, the diff of this file is not supported yet
788737