Migrated some common components and their dependencies to TS

This commit is contained in:
Alejandro Celaya
2020-08-29 09:19:15 +02:00
parent a96539129d
commit f40ad91ea9
25 changed files with 274 additions and 322 deletions

View File

@@ -23,7 +23,7 @@ export const useStateFlagTimeout = (
return [ flag, callback ];
};
type ToggleResult = [ boolean, (flag: boolean) => void, () => void, () => void ];
type ToggleResult = [ boolean, () => void, () => void, () => void ];
export const useToggle = (initialValue = false): ToggleResult => {
const [ flag, setFlag ] = useState<boolean>(initialValue);