@yamada-ui/use-disclosure
Advanced tools
Comparing version 0.0.0-dev-20230705143857 to 0.0.0-dev-20230708075131
type UseDisclosureProps = { | ||
isOpen?: boolean; | ||
defaultIsOpen?: boolean; | ||
onClose?: (args?: any) => void; | ||
onOpen?: (args?: any) => void; | ||
onClose?: (...args: any) => void; | ||
onOpen?: (...args: any) => void; | ||
}; | ||
@@ -7,0 +7,0 @@ declare const useDisclosure: (props?: UseDisclosureProps) => UseDisclosureReturn; |
@@ -37,6 +37,6 @@ "use strict"; | ||
const onOpen = (0, import_react.useCallback)( | ||
(args) => { | ||
(...args) => { | ||
if (!isControlled) | ||
setIsOpen(true); | ||
handleOpen == null ? void 0 : handleOpen(args); | ||
handleOpen == null ? void 0 : handleOpen(...args); | ||
}, | ||
@@ -46,6 +46,6 @@ [isControlled, handleOpen] | ||
const onClose = (0, import_react.useCallback)( | ||
(args) => { | ||
(...args) => { | ||
if (!isControlled) | ||
setIsOpen(false); | ||
handleClose == null ? void 0 : handleClose(args); | ||
handleClose == null ? void 0 : handleClose(...args); | ||
}, | ||
@@ -52,0 +52,0 @@ [isControlled, handleClose] |
{ | ||
"name": "@yamada-ui/use-disclosure", | ||
"version": "0.0.0-dev-20230705143857", | ||
"version": "0.0.0-dev-20230708075131", | ||
"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
7651