useLocalStorage

useLocalStorage is a custom hook to help handle storing data in Local Storage.

import { useLocalStorage } from 'minerva-ui';

The useLocalStorage hook returns an object with the following fields:

NameTypeDefaultDescription
isOpenbooleanfalseIf true, it sets the component to it's visible state.
onClosefunctionFunction that sets isOpen to false.
onOpenfunctionFunction that sets isOpen to true.
onTogglefunctionFunction that toggles isOpen between true and false.

Usage

You've clicked the button 0 times.