@yamada-ui/use-disclosure
Advanced tools
Comparing version 0.0.0-dev-20230708075131 to 0.0.0-dev-20230708075735
@@ -10,5 +10,5 @@ type UseDisclosureProps = { | ||
isOpen: boolean, | ||
onOpen: () => void, | ||
onClose: () => void, | ||
onToggle: () => void | ||
onOpen: (...args: any) => void, | ||
onClose: (...args: any) => void, | ||
onToggle: (...args: any) => void | ||
]; | ||
@@ -15,0 +15,0 @@ type LazyMode = 'unmount' | 'keepMounted'; |
@@ -52,3 +52,6 @@ "use strict"; | ||
); | ||
const onToggle = (0, import_react.useCallback)(() => !isOpen ? onOpen() : onClose(), [isOpen, onOpen, onClose]); | ||
const onToggle = (0, import_react.useCallback)( | ||
(...args) => !isOpen ? onOpen(...args) : onClose(...args), | ||
[isOpen, onOpen, onClose] | ||
); | ||
return [isOpen, onOpen, onClose, onToggle]; | ||
@@ -55,0 +58,0 @@ }; |
{ | ||
"name": "@yamada-ui/use-disclosure", | ||
"version": "0.0.0-dev-20230708075131", | ||
"version": "0.0.0-dev-20230708075735", | ||
"description": "Yamada UI useDisclosure custom hook", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7753
147
2303