UNPKG

solid-awesome-hooks

Version:
11 lines (10 loc) 463 B
type Action = "hide" | "reveal"; export declare const useVisibleState: (initialState?: boolean) => { isOpen: import("solid-js").Accessor<boolean>; setOpen: import("solid-js").Setter<boolean>; hide: () => false; reveal: () => true; /** A useful wrapper which adds `reveal` or `hide` action for wrapping function */ withAction: <T extends any[], U>(action: Action, callback?: (...args: T) => U) => (...args: T) => U; }; export {};