@yamada-ui/use-disclosure
Advanced tools
Comparing version 0.0.0-dev-20231019162858 to 0.0.0-dev-20231024081046
@@ -1,17 +0,13 @@ | ||
import { Primitive } from '@yamada-ui/utils'; | ||
type Args = Array<any> | object | Primitive; | ||
type ChainFunction<T extends Args = any> = (...args: T extends Array<any> ? T : T[]) => void | Promise<void>; | ||
type UseDisclosureProps<T extends Args = any> = { | ||
type UseDisclosureProps<T extends (...args: any[]) => any = () => void> = { | ||
isOpen?: boolean; | ||
defaultIsOpen?: boolean; | ||
onOpen?: ChainFunction<T>; | ||
onClose?: ChainFunction<T>; | ||
onOpen?: T; | ||
onClose?: T; | ||
timing?: 'before' | 'after'; | ||
}; | ||
declare const useDisclosure: <T extends Args = any>(props?: UseDisclosureProps<T>) => { | ||
declare const useDisclosure: <T extends (...args: any[]) => any = () => void>(props?: UseDisclosureProps<T>) => { | ||
isOpen: boolean; | ||
onOpen: ChainFunction<T>; | ||
onClose: ChainFunction<T>; | ||
onToggle: ChainFunction<T>; | ||
onOpen: T; | ||
onClose: T; | ||
onToggle: T; | ||
}; | ||
@@ -18,0 +14,0 @@ type UseDisclosureReturn = ReturnType<typeof useDisclosure>; |
{ | ||
"name": "@yamada-ui/use-disclosure", | ||
"version": "0.0.0-dev-20231019162858", | ||
"version": "0.0.0-dev-20231024081046", | ||
"description": "Yamada UI useDisclosure custom hook", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@yamada-ui/utils": "0.0.0-dev-20231019162858" | ||
"@yamada-ui/utils": "0.3.2" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
9637
168
+ Added@yamada-ui/utils@0.3.2(transitive)
- Removed@yamada-ui/utils@0.0.0-dev-20231019162858(transitive)
Updated@yamada-ui/utils@0.3.2