@pastable/react
Version:
4 lines (3 loc) • 374 B
TypeScript
import { PrimitiveAtom, WritableAtom } from "jotai";
export declare function atomWithToggle(initialValue?: boolean, createAtom?: (initialValue: boolean) => PrimitiveAtom<boolean>): WritableAtom<boolean, boolean | undefined>;
export declare function atomWithToggleAndStorage(key: string, initialValue?: boolean, storage?: any): WritableAtom<boolean, boolean | undefined>;