UNPKG

@praetorian-chariot/ui

Version:

The UI component library for Chariot, built with Tailwind CSS and React.

15 lines 673 B
interface StorageConfig<T> { parentState?: T; onParentStateChange?: (value: T) => void; } /** * A hook that manages state with support for both controlled and uncontrolled behavior. * Similar to React's built-in hooks but with additional control over state management. * * @param config Configuration object containing parent state and change handler * @param defaultValue The default value to use when uncontrolled * @returns A tuple containing the current state and a function to update it */ export declare function useStorage<T>(config: StorageConfig<T>, defaultValue: T): [T, (value: T) => void]; export {}; //# sourceMappingURL=useStorage.util.d.ts.map