refactor: export all hooks functions directly from main module

refactor: rename the modules to make sure tree-shaking works
This commit is contained in:
unix
2020-05-15 23:10:02 +08:00
parent b93acc8d75
commit 4e7b4cc57d
46 changed files with 82 additions and 57 deletions

View File

@@ -1,3 +1,3 @@
import useBodyScroll from '../utils-shared/use-body-scroll'
import useBodyScroll from '../utils-shared-deprecated/use-body-scroll'
export default useBodyScroll

View File

@@ -1,3 +1,3 @@
import { default as useClickAway } from '../utils-shared/use-click-away'
import { default as useClickAway } from '../utils-shared-deprecated/use-click-away'
export default useClickAway

View File

@@ -1,3 +1,3 @@
import useClipboard from '../utils-shared/use-clipboard'
import useClipboard from '../utils-shared-deprecated/use-clipboard'
export default useClipboard

View File

@@ -1,3 +1,3 @@
import useCurrentState from '../utils-shared/use-current-state'
import useCurrentState from '../utils-shared-deprecated/use-current-state'
export default useCurrentState

View File

@@ -1,5 +1,5 @@
import React from 'react'
import { ToastWithID } from '../toast/toast-container'
import { ToastWithID } from '../use-toasts/toast-container'
export type UpdateToastsFunction<T> = (fn: (toasts: Array<T>) => Array<T>) => any