3.2.0 • Published 1 year ago
@neogeek/common-react-hooks v3.2.0
@neogeek/common-react-hooks
Install
$ npm install @neogeek/common-react-hooks
Documentation
useDisabledFocus(ref, disabled)
const ExampleFunction = () => {
const [disabled, setDisabled] = useState(false);
const ref = useRef<HTMLButtonElement>(null);
useDisabledFocus(ref, disabled);
return (
<button ref={ref} onClick={() => setDisabled(true)}>
Save
</button>
);
};
useFlash(trigger, [timeoutInMilliseconds = 1000])
const isFlashVisible = useFlash(false);